blob: 813b174309cd0ea8a9869256d0668fcc286b94d5 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
import public "protos/perfetto/trace/track_event/track_event.proto";
package perfetto.protos;
enum ChromeAppState {
APP_STATE_FOREGROUND = 1;
APP_STATE_BACKGROUND = 2;
}
enum MemoryPressureLevel {
MEMORY_PRESSURE_LEVEL_NONE = 0;
MEMORY_PRESSURE_LEVEL_MODERATE = 1;
MEMORY_PRESSURE_LEVEL_CRITICAL = 2;
}
message ChromeMemoryPressureNotification {
optional MemoryPressureLevel level = 1;
// ID of interned source location where MemoryPressureListener was created
optional uint64 creation_location_iid = 2;
}
message ChromeTaskAnnotator {
optional uint32 ipc_hash = 1;
}
message ChromeBrowserContext {
optional fixed64 ptr = 1;
}
message ChromeProfileDestroyer {
optional fixed64 profile_ptr = 1;
optional bool is_off_the_record = 2;
optional string otr_profile_id = 3;
optional uint32 host_count_at_creation = 4;
optional uint32 host_count_at_destruction = 5;
optional fixed64 render_process_host_ptr = 6;
}
message ChromeTaskPostedToDisabledQueue {
optional string task_queue_name = 1;
optional uint64 time_since_disabled_ms = 2;
optional uint32 ipc_hash = 3;
optional uint64 source_location_iid = 4;
}
message ChromeRasterTask {
optional int64 source_frame_number = 1;
}
message ChromeMessagePumpForUI {
// The MSG defined in winuser.h.
optional uint32 message_id = 1;
}
// An enumeration specifying the reason of the RenderFrame deletion.
// This is copied from content/common/frame.mojom.
enum FrameDeleteIntention {
// The frame being deleted isn't a (speculative) main frame.
FRAME_DELETE_INTENTION_NOT_MAIN_FRAME = 0;
// The frame being deleted is a speculative main frame, and it is being
// deleted as part of the shutdown for that WebContents. The entire RenderView
// etc will be destroyed by a separate IPC sent later.
FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_SHUTDOWN = 1;
// The frame being deleted is a speculative main frame, and it is being
// deleted because the speculative navigation was cancelled. This is not part
// of shutdown.
FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_NAVIGATION_CANCELLED = 2;
}
message RenderFrameImplDeletion {
// The intent for the deletion.
optional FrameDeleteIntention intent = 1;
// Whether the frame that's about to be deleted has a pending navigation
// commit.
optional bool has_pending_commit = 2;
// Whether the frame that's about to be deleted has a pending cross-document
// navigation commit.
optional bool has_pending_cross_document_commit = 3;
// The FrameTreeNode ID of the frame that's about to be deleted.
optional uint64 frame_tree_node_id = 4;
}
enum ShouldSwapBrowsingInstance {
// No BrowsingInstance swap.
SHOULD_SWAP_BROWSING_INSTANCE_NO = 0;
// Forced BrowsingInstance swap.
SHOULD_SWAP_BROWSING_INSTANCE_YES_FORCE_SWAP = 1;
// Proactive BrowsingInstance swap for cross-site navigation.
SHOULD_SWAP_BROWSING_INSTANCE_YES_CROSS_SITE_PROACTIVE_SWAP = 2;
// Proactive BrowsingInstance swap for same-site navigation.
SHOULD_SWAP_BROWSING_INSTANCE_YES_SAME_SITE_PROACTIVE_SWAP = 3;
}
message ShouldSwapBrowsingInstancesResult {
// The FrameTreeNode ID.
optional uint64 frame_tree_node_id = 1;
// Whether a navigation will do a BrowsingInstance swap or not.
optional ShouldSwapBrowsingInstance result = 2;
}
message FrameTreeNodeInfo {
// The FrameTreeNode ID.
optional uint64 frame_tree_node_id = 1;
// Whether the frame is a main frame or not.
optional bool is_main_frame = 2;
// Whether there's a speculative RenderFrameHost or not.
optional bool has_speculative_render_frame_host = 3;
}
message ChromeHashedPerformanceMark {
optional uint32 site_hash = 1;
optional string site = 2;
optional uint32 mark_hash = 3;
optional string mark = 4;
}
message ChromeTrackEvent {
// Extension range for Chrome: 1000-1999
// Next ID: 1012
extend TrackEvent {
optional ChromeAppState chrome_app_state = 1000;
optional ChromeMemoryPressureNotification
chrome_memory_pressure_notification = 1001;
optional ChromeTaskAnnotator chrome_task_annotator = 1002;
optional ChromeBrowserContext chrome_browser_context = 1003;
optional ChromeProfileDestroyer chrome_profile_destroyer = 1004;
optional ChromeTaskPostedToDisabledQueue
chrome_task_posted_to_disabled_queue = 1005;
optional ChromeRasterTask chrome_raster_task = 1006;
optional ChromeMessagePumpForUI chrome_message_pump_for_ui = 1007;
optional RenderFrameImplDeletion render_frame_impl_deletion = 1008;
optional ShouldSwapBrowsingInstancesResult
should_swap_browsing_instances_result = 1009;
optional FrameTreeNodeInfo frame_tree_node_info = 1010;
optional ChromeHashedPerformanceMark chrome_hashed_performance_mark = 1011;
}
}