• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto2";
6
7import public "protos/perfetto/trace/track_event/track_event.proto";
8import public "protos/perfetto/trace/track_event/debug_annotation.proto";
9
10package perfetto.protos;
11
12enum ChromeAppState {
13  APP_STATE_FOREGROUND = 1;
14  APP_STATE_BACKGROUND = 2;
15}
16
17enum MemoryPressureLevel {
18  MEMORY_PRESSURE_LEVEL_NONE = 0;
19  MEMORY_PRESSURE_LEVEL_MODERATE = 1;
20  MEMORY_PRESSURE_LEVEL_CRITICAL = 2;
21}
22
23message ChromeMemoryPressureNotification {
24  optional MemoryPressureLevel level = 1;
25
26  // ID of interned source location where MemoryPressureListener was created
27  optional uint64 creation_location_iid = 2;
28}
29
30message ChromeTaskAnnotator {
31  optional uint32 ipc_hash = 1;
32  // The delay in microseconds that was specified, if any, when this task was
33  // posted. This is only valid for delayed tasks.
34  optional uint64 task_delay_us = 2;
35}
36
37message ChromeBrowserContext {
38  reserved 1;
39  optional string id = 2;
40}
41
42message ChromeProfileDestroyer {
43  optional fixed64 profile_ptr = 1;
44  optional bool is_off_the_record = 2;
45  optional string otr_profile_id = 3;
46  optional uint32 host_count_at_creation = 4;
47  optional uint32 host_count_at_destruction = 5;
48  optional fixed64 render_process_host_ptr = 6;
49}
50
51message ChromeTaskPostedToDisabledQueue {
52  optional string task_queue_name = 1;
53  optional uint64 time_since_disabled_ms = 2;
54  optional uint32 ipc_hash = 3;
55  optional uint64 source_location_iid = 4;
56}
57
58message ChromeRasterTask {
59  optional int64 source_frame_number = 1;
60}
61
62message ChromeMessagePumpForUI {
63  // The MSG defined in winuser.h.
64  optional uint32 message_id = 1;
65}
66
67// An enumeration specifying the reason of the RenderFrame deletion.
68// This is copied from content/common/frame.mojom.
69enum FrameDeleteIntention {
70  // The frame being deleted isn't a (speculative) main frame.
71  FRAME_DELETE_INTENTION_NOT_MAIN_FRAME = 0;
72
73  // The frame being deleted is a speculative main frame, and it is being
74  // deleted as part of the shutdown for that WebContents. The entire RenderView
75  // etc will be destroyed by a separate IPC sent later.
76  FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_SHUTDOWN = 1;
77
78  // The frame being deleted is a speculative main frame, and it is being
79  // deleted because the speculative navigation was cancelled. This is not part
80  // of shutdown.
81  FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_NAVIGATION_CANCELLED = 2;
82}
83
84message RenderFrameImplDeletion {
85  // The intent for the deletion.
86  optional FrameDeleteIntention intent = 1;
87
88  // Whether the frame that's about to be deleted has a pending navigation
89  // commit.
90  optional bool has_pending_commit = 2;
91
92  // Whether the frame that's about to be deleted has a pending cross-document
93  // navigation commit.
94  optional bool has_pending_cross_document_commit = 3;
95
96  // The FrameTreeNode ID of the frame that's about to be deleted.
97  optional uint64 frame_tree_node_id = 4;
98}
99
100// Matches content::ShouldSwapBrowsingInstance.
101enum ShouldSwapBrowsingInstance {
102  // Was used for all "no BrowsingInstance swap" scenarios, now broken down in
103  // separate reasons.
104  SHOULD_SWAP_BROWSING_INSTANCE_NO = 0;
105
106  // Forced BrowsingInstance swap.
107  SHOULD_SWAP_BROWSING_INSTANCE_YES_FORCE_SWAP = 1;
108
109  // Proactive BrowsingInstance swap for cross-site navigation.
110  SHOULD_SWAP_BROWSING_INSTANCE_YES_CROSS_SITE_PROACTIVE_SWAP = 2;
111
112  // Proactive BrowsingInstance swap for same-site navigation.
113  SHOULD_SWAP_BROWSING_INSTANCE_YES_SAME_SITE_PROACTIVE_SWAP = 3;
114
115  SHOULD_SWAP_BROWSING_INSTANCE_NO_PROACTIVE_SWAP_DISABLED = 4;
116  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_MAIN_FRAME = 5;
117  SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_RELATED_ACTIVE_CONTENTS = 6;
118  SHOULD_SWAP_BROWSING_INSTANCE_NO_DOES_NOT_HAVE_SITE = 7;
119  SHOULD_SWAP_BROWSING_INSTANCE_NO_SOURCE_URL_SCHEME_NOT_HTTP_OR_HTTPS = 8;
120  SHOULD_SWAP_BROWSING_INSTANCE_NO_DESTINATION_URL_SCHEME_NOT_HTTP_OR_HTTPS = 9;
121  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_SITE_NAVIGATION = 10;
122  SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOADING_ERROR_PAGE = 11;
123  SHOULD_SWAP_BROWSING_INSTANCE_NO_ALREADY_HAS_MATCHING_BROWSING_INSTANCE = 12;
124  SHOULD_SWAP_BROWSING_INSTANCE_NO_RENDERER_DEBUG_URL = 13;
125  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_NEEDED_FOR_BACK_FORWARD_CACHE = 14;
126  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_DOCUMENT_NAVIGATION = 15;
127  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_URL_NAVIGATION = 16;
128  SHOULD_SWAP_BROWSING_INSTANCE_NO_WILL_REPLACE_ENTRY = 17;
129  SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOAD = 18;
130  SHOULD_SWAP_BROWSING_INSTANCE_NO_GUEST = 19;
131  SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_NOT_COMMITTED_ANY_NAVIGATION = 20;
132  SHOULD_SWAP_BROWSING_INSTANCE_NO_UNLOAD_HANDLER_EXISTS_ON_SAME_SITE_NAVIGATION =
133      21;
134  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_PRIMARY_MAIN_FRAME = 22;
135}
136
137message ShouldSwapBrowsingInstancesResult {
138  // The FrameTreeNode ID.
139  optional uint64 frame_tree_node_id = 1;
140
141  // Whether a navigation will do a BrowsingInstance swap or not.
142  optional ShouldSwapBrowsingInstance result = 2;
143}
144
145message FrameTreeNodeInfo {
146  // The FrameTreeNode ID.
147  optional uint64 frame_tree_node_id = 1;
148
149  // Whether the frame is a main frame or not.
150  optional bool is_main_frame = 2;
151
152  // Whether there's a speculative RenderFrameHost or not.
153  optional bool has_speculative_render_frame_host = 3;
154
155  optional RenderFrameHost current_frame_host = 4;
156  optional RenderFrameHost speculative_frame_host = 5;
157
158  // Additional untyped debug information associated with this
159  // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API.
160  repeated DebugAnnotation debug_annotations = 99;
161}
162
163message ChromeHashedPerformanceMark {
164  optional uint32 site_hash = 1;
165  optional string site = 2;
166  optional uint32 mark_hash = 3;
167  optional string mark = 4;
168
169  // A randomly generated unique identifier for a given ExecutionContext
170  // (document, worker, etc). Used to be able to correlate events in a process
171  // where there are multiple execution contexts from the same site.
172  optional uint32 execution_context_id = 5;
173
174  // Indicates the sequence number of this particular mark being emitted from
175  // a particular site in the scope of a single ExecutionContext. Typical
176  // sites emit batches of events that are correlated in time (a thing started,
177  // a thing reached a given milestone, a thing completed). When these events
178  // are intermixed it is useful to know which ones are semantically related.
179  // The value is generated by the content itself, but shifted by a fixed
180  // random offset at runtime so as to limit usage as a side channel.
181  optional uint32 sequence_number = 6;
182}
183
184message ChromeWebAppBadNavigate {
185  optional bool is_kiosk = 1;
186  optional bool has_hosted_app_controller = 2;
187  optional string app_name = 3;
188  optional uint32 system_app_type = 4;
189  optional bool web_app_provider_registry_ready = 5;
190  optional bool system_web_app_manager_synchronized = 6;
191}
192
193// These IDs are generated at compile time and differ for each chrome version.
194// IDs are stable on for a given chrome version but are changing when resources
195// are added or removed to chrome.
196message ResourceBundle {
197  optional uint32 resource_id = 1;
198}
199
200// Information about RenderProcessHost.
201message RenderProcessHost {
202  // Unique Id to identify the RenderProcessHost. This is the browser-side,
203  // persistent id for this RenderProcessHost that stays constant even across OS
204  // layer processes managed by this RenderProcessHost.
205  optional uint32 id = 1;
206  // See ProcessLock::ToString().
207  optional string process_lock = 2;
208  // The PID of the child process.
209  optional int32 child_process_id = 3;
210
211  // Details about the associated browser context.
212  optional ChromeBrowserContext browser_context = 4;
213
214  // Additional untyped debug information associated with this
215  // RenderProcessHost, populated via TracedProto::AddDebugAnnotations API.
216  repeated DebugAnnotation debug_annotations = 99;
217}
218
219message RenderProcessHostListener {
220  // Routing ID of the listener to the RenderProcessHost, recorded when a new ID
221  // is added or when an ID is removed.
222  optional uint32 routing_id = 1;
223}
224
225message RenderProcessHostCleanup {
226  // Number of IPC listeners registered to the host when Cleanup() was called.
227  optional uint32 listener_count = 1;
228  // Number of "keep alive" references active in the RenderProcessHost, recorded
229  // when Cleanup() was called.
230  optional uint32 keep_alive_ref_count = 2;
231  // Number of "shutdown delay" references active in the RenderProcessHost,
232  // recorded when Cleanup() was called.
233  optional uint32 shutdown_delay_ref_count = 3;
234  // Number of "worker delay" references active in the RenderProcessHost,
235  // recorded when Cleanup() was called.
236  optional uint32 worker_ref_count = 4;
237}
238
239message ChildProcessLauncherPriority {
240  // True if the new priority set to background.
241  optional bool is_backgrounded = 1;
242  // True if the renderer proecss has pending views.
243  optional bool has_pending_views = 2;
244
245  // Importance of the child process in Android.
246  enum Importance {
247    IMPORTANCE_NORMAL = 1;
248    IMPORTANCE_MODERATE = 2;
249    IMPORTANCE_IMPORTANT = 3;
250  }
251  optional Importance importance = 3;
252}
253
254// Information that identifies a Chrome Extension.
255message ChromeExtensionId {
256  // Unique id that identifies a Chrome Extension.
257  optional string extension_id = 1;
258
259  // Pseudonymized `extension_id` field (see also
260  // content::PseudonymizationUtil::PseudonymizeString method).
261  optional uint32 pseudonymized_extension_id = 2;
262}
263
264message SiteInstance {
265  // The ID of the SiteInstance.
266  optional int32 site_instance_id = 1;
267
268  // The ID of the BrowsingInstance that the SiteInstance belongs to.
269  optional int32 browsing_instance_id = 2;
270
271  // Whether the SiteInstance is the "default SiteInstance" or not. Non-isolated
272  // sites on Android are not assigned to their own specific per-site process,
273  // and shares SiteInstances with each other (the default SiteInstance).
274  optional bool is_default = 3;
275
276  // Whether this SiteInstance has a running process associated with it.
277  optional bool has_process = 4;
278
279  // Returns the total active WebContents count for this SiteInstance and all
280  // related SiteInstances in the same BrowsingInstance.
281  optional int32 related_active_contents_count = 5;
282
283  // The number of active RenderFrameHosts this SiteInstance's SiteInstanceGroup
284  // has.
285  optional int32 active_rfh_count = 6;
286
287  // The SiteInstanceGroup this SiteInstance belongs to.
288  optional SiteInstanceGroup site_instance_group = 7;
289
290  // Additional untyped debug information associated with this
291  // SiteInstance, populated via TracedProto::AddDebugAnnotations API.
292  repeated DebugAnnotation debug_annotations = 99;
293}
294
295message SiteInstanceGroup {
296  // The ID of the SiteInstanceGroup.
297  optional int32 site_instance_group_id = 1;
298
299  // The number of active frames in this SiteInstanceGroup.
300  optional int32 active_frame_count = 2;
301
302  // The process ID of the SiteInstanceGroup.
303  optional RenderProcessHost process = 3;
304
305  // Additional untyped debug information associated with this
306  // SiteInstanceGroup, populated via TracedProto::AddDebugAnnotations API.
307  repeated DebugAnnotation debug_annotations = 99;
308}
309
310// Next ID: 7
311message RenderViewHost {
312  // The RenderViewHostMapId for the RenderViewHost.
313  optional int32 rvh_map_id = 1;
314
315  // The routing ID for the RenderViewHost.
316  optional int32 routing_id = 2;
317
318  // The process ID of the RenderViewHost. Deprecated in favour of |process|.
319  optional int32 process_id = 3;
320
321  // Process this RenderViewHost is associated with.
322  optional RenderProcessHost process = 6;
323
324  // Whether the RenderViewHost is in back/forward cache or not.
325  optional bool is_in_back_forward_cache = 4;
326
327  // Whether the renderer-side RenderView is created.
328  optional bool renderer_view_created = 5;
329
330  // Additional untyped debug information associated with this
331  // RenderViewHost, populated via TracedProto::AddDebugAnnotations API.
332  repeated DebugAnnotation debug_annotations = 99;
333}
334
335message RenderFrameProxyHost {
336  // The routing ID for the RenderFrameProxyHost.
337  optional int32 routing_id = 1;
338
339  // The process ID of the RenderFrameProxyHost.
340  optional int32 process_id = 2;
341
342  // The RenderViewHostMapId of the RenderViewHost associated with the
343  // RenderFrameProxyHost.
344  optional int32 rvh_map_id = 3;
345
346  // The SiteInstanceId of the SiteInstance associated with the
347  // RenderFrameProxyHost.
348  optional int32 site_instance_id = 4;
349
350  // Whether the renderer-side RenderFrameProxy is live or not.
351  optional bool is_render_frame_proxy_live = 5;
352
353  // The SiteInstanceGroupId of the SiteInstanceGroup associated with the
354  // RenderFrameProxyHost.
355  optional int32 site_instance_group_id = 6;
356
357  // Additional untyped debug information associated with this
358  // RenderFrameProxyHost, populated via TracedProto::AddDebugAnnotations API.
359  repeated DebugAnnotation debug_annotations = 99;
360}
361
362message AndroidView {
363  optional int32 id = 1;
364  optional int32 parent_id = 2;
365  optional bool is_shown = 3;
366  optional bool is_dirty = 4;
367  optional string class_name = 5;
368  optional string resource_name = 6;
369}
370
371message AndroidActivity {
372  optional string name = 1;
373  repeated AndroidView view = 2;
374}
375
376message AndroidViewDump {
377  repeated AndroidActivity activity = 1;
378}
379
380message ParkableStringCompressInBackground {
381  // The size of the string that is being compressed, in bytes.
382  optional int32 size_bytes = 1;
383}
384
385message ParkableStringUnpark {
386  // The size of the string that is being unparked, in bytes.
387  optional int32 size_bytes = 1;
388
389  // The elapsed time since the string was written to disk (in seconds), or -1
390  // if it hadn't yet been written to disk.
391  optional int32 time_since_last_disk_write_sec = 2;
392}
393
394message ChromeSamplingProfilerSampleCollected {
395  optional int32 frame_count = 1;
396
397  enum WriteStatus {
398    WRITE_STATUS_NONE = 0;
399    WRITE_STATUS_BUFFERING_SAMPLE = 1;
400    WRITE_STATUS_WRITING_BUFFERED = 2;
401    WRITE_STATUS_WRITING_TO_TRACE = 3;
402  }
403  optional WriteStatus write_status = 2;
404
405  optional int32 sampled_thread_id = 3;
406}
407
408// Reports the latency caused by each breakdown in the
409// SendBeginMainFrameToCommit stage of the PipelineReporter.
410message SendBeginMainFrameToCommitBreakdown {
411  // Handle input events breakdown
412  optional uint64 handle_input_events_us = 1;
413
414  // Animate breakdown
415  optional uint64 animate_us = 2;
416
417  // Style update breakdown
418  optional uint64 style_update_us = 3;
419
420  // Layout update breakdown
421  optional uint64 layout_update_us = 4;
422
423  // Prepaint breakdown
424  optional uint64 prepaint_us = 5;
425
426  // Compositing inputs breakdown
427  optional uint64 compositing_inputs_us = 6;
428
429  // Compositing assignments breakdown
430  optional uint64 compositing_assignments_us = 7;
431
432  // Paint breakdown
433  optional uint64 paint_us = 8;
434
435  // Composite commit breakdown
436  optional uint64 composite_commit_us = 9;
437
438  // Update layers breakdown
439  optional uint64 update_layers_us = 10;
440
441  // Beginmainsenttostarted breakdown
442  optional uint64 begin_main_sent_to_started_us = 11;
443}
444
445message GlobalRenderFrameHostId {
446  optional int32 routing_id = 1;
447  optional int32 process_id = 2;
448}
449
450message BrowsingContextState {
451  // The ID of the BrowsingInstance that the BrowsingContextState belongs to.
452  optional int32 browsing_instance_id = 1;
453
454  // Additional untyped debug information associated with this
455  // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API.
456  repeated DebugAnnotation debug_annotations = 99;
457}
458
459message RenderFrameHost {
460  optional RenderProcessHost process = 1;
461  optional GlobalRenderFrameHostId render_frame_host_id = 2;
462
463  // NOTE: this proto must be kept consistent with
464  // RenderFrameHostImpl::LifecycleStateImpl.
465  enum LifecycleState {
466    UNSPECIFIED = 0;
467    SPECULATIVE = 1;
468    PENDING_COMMIT = 2;
469    PRERENDERING = 3;
470    ACTIVE = 4;
471    IN_BACK_FORWARD_CACHE = 5;
472    RUNNING_UNLOAD_HANDLERS = 6;
473    READY_TO_BE_DELETED = 7;
474  }
475
476  optional LifecycleState lifecycle_state = 3;
477  optional string origin = 4;
478  optional string url = 5;
479  optional uint64 frame_tree_node_id = 6;
480  optional SiteInstance site_instance = 7;
481  optional RenderFrameHost parent = 8;
482  optional RenderFrameHost outer_document = 9;
483  optional RenderFrameHost embedder = 10;
484  optional BrowsingContextState browsing_context_state = 11;
485
486  // Additional untyped debug information associated with this
487  // RenderViewHost, populated via TracedProto::AddDebugAnnotations API.
488  repeated DebugAnnotation debug_annotations = 99;
489}
490
491message ChromeThreadPoolTask {
492  enum Priority {
493    PRIORITY_UNSPECIFIED = 0;
494    PRIORITY_BEST_EFFORT = 1;
495    PRIORITY_USER_VISIBLE = 2;
496    PRIORITY_USER_BLOCKING = 3;
497  }
498
499  enum ExecutionMode {
500    EXECTUION_MODE_UNSPECIFIED = 0;
501    EXECUTION_MODE_PARALLEL = 1;
502    EXECUTION_MODE_SEQUENCED = 2;
503    EXECUTION_MODE_SINGLE_THREAD = 3;
504    EXECUTION_MODE_JOB = 4;
505  }
506
507  enum ShutdownBehavior {
508    SHUTDOWN_BEHAVIOR_UNSPECIFIED = 0;
509    SHUTDOWN_BEHAVIOR_CONTINUE_ON_SHUTDOWN = 1;
510    SHUTDOWN_BEHAVIOR_SKIP_ON_SHUTDOWN = 2;
511    SHUTDOWN_BEHAVIOR_BLOCK_SHUTDOWN = 3;
512  }
513
514  optional Priority task_priority = 1;
515  optional ExecutionMode execution_mode = 2;
516  optional int64 sequence_token = 3;
517  optional ShutdownBehavior shutdown_behavior = 4;
518}
519
520// TODO(crbug.com/1258495): Add more information.
521message BackForwardCacheCanStoreDocumentResult {
522  enum BackForwardCacheNotRestoredReason {
523    NOT_MAIN_FRAME = 1;
524    // BackForwardCache is disabled due to low memory device, base::Feature or
525    // command line. Note that the more specific NotRestoredReasons
526    // BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY and
527    // BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE will also be set as other
528    // reasons along with this when appropriate.
529    BACK_FORWARD_CACHE_DISABLED = 2;
530    RELATED_ACTIVE_CONTENTS_EXIST = 3;
531    HTTP_STATUS_NOT_OK = 4;
532    SCHEME_NOT_HTTP_OR_HTTPS = 5;
533    LOADING = 6;
534    WAS_GRANTED_MEDIA_ACCESS = 7;
535    BLOCKLISTED_FEATURES = 8;
536    DISABLE_FOR_RENDER_FRAME_HOST_CALLED = 9;
537    DOMAIN_NOT_ALLOWED = 10;
538    HTTP_METHOD_NOT_GET = 11;
539    SUBFRAME_IS_NAVIGATING = 12;
540    TIMEOUT = 13;
541    CACHE_LIMIT = 14;
542    JAVASCRIPT_EXECUTION = 15;
543    RENDERER_PROCESS_KILLED = 16;
544    RENDERER_PROCESS_CRASHED = 17;
545    GRANTED_MEDIA_STREAM_ACCESS = 19;
546    SCHEDULER_TRACKED_FEATURE_USED = 20;
547    CONFLICTING_BROWSING_INSTANCE = 21;
548    CACHE_FLUSHED = 22;
549    SERVICE_WORKER_VERSION_ACTIVATION = 23;
550    SESSION_RESTORED = 24;
551    UNKNOWN = 25;
552    SERVICE_WORKER_POST_MESSAGE = 26;
553    ENTERED_BACK_FORWARD_CACHE_BEFORE_SERVICE_WORKER_HOST_ADDED = 27;
554    NOT_MOST_RECENT_NAVIGATION_ENTRY = 28;
555    SERVICE_WORKER_CLAIM = 29;
556    IGNORE_EVENT_AND_EVICT = 30;
557    HAVE_INNER_CONTENTS = 31;
558    TIMEOUT_PUTTING_IN_CACHE = 32;
559    // BackForwardCache is disabled due to low memory device.
560    BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY = 33;
561    // BackForwardCache is disabled due to command-line switch (may include
562    // cases where the embedder disabled it due to, e.g., enterprise policy).
563    BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE = 34;
564    NETWORK_REQUEST_REDIRECTED = 35;
565    NETWORK_REQUEST_TIMEOUT = 36;
566    NETWORK_EXCEEDS_BUFFER_LIMIT = 37;
567    NAVIGATION_CANCELLED_WHILE_RESTORING = 38;
568    BACK_FORWARD_CACHE_DISABLED_FOR_PRERENDER = 39;
569    USER_AGENT_OVERRIDE_DIFFERS = 40;
570    NETWORK_REQUEST_DATAPIPE_DRAINED_AS_BYTES_CONSUMER = 41;
571    FOREGROUND_CACHE_LIMIT = 42;
572    BROWSING_INSTANCE_NOT_SWAPPED = 43;
573    BACK_FORWARD_CACHE_DISABLED_FOR_DELEGATE = 44;
574    OPT_IN_UNLOAD_HEADER_NOT_PRESENT = 45;
575    UNLOAD_HANDLER_EXISTS_IN_MAIN_FRAME = 46;
576    UNLOAD_HANDLER_EXISTS_IN_SUBFRAME = 47;
577    SERVICE_WORKER_UNREGISTRATION = 48;
578    CACHE_CONTROL_NO_STORE = 49;
579    CACHE_CONTROL_NO_STORE_COOKIE_MODIFIED = 50;
580    CACHE_CONTROL_NO_STORE_HTTP_ONLY_COOKIE_MODIFIED = 51;
581    NO_RESPONSE_HEAD = 52;
582    ACTIVATION_NAVIGATION_DISALLOWED_FOR_BUG_1234857 = 53;
583    ERROR_DOCUMENT = 54;
584    FENCED_FRAMES_EMBEDDER = 55;
585  }
586
587  optional BackForwardCacheNotRestoredReason
588      back_forward_cache_not_restored_reason = 1;
589}
590
591message RendererMainThreadTaskExecution {
592  enum TaskType {
593    TASK_TYPE_UNKNOWN = 0;
594    TASK_TYPE_DOM_MANIPULATION = 1;
595    TASK_TYPE_USER_INTERACTION = 2;
596    TASK_TYPE_NETWORKING = 3;
597    TASK_TYPE_NETWORKING_CONTROL = 4;
598    TASK_TYPE_HISTORY_TRAVERSAL = 5;
599    TASK_TYPE_EMBED = 6;
600    TASK_TYPE_MEDIA_ELEMENT_EVENT = 7;
601    TASK_TYPE_CANVAS_BLOB_SERIALIZATION = 8;
602    TASK_TYPE_MICROTASK = 9;
603    TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_HIGH_NESTING = 10;
604    TASK_TYPE_REMOTE_EVENT = 11;
605    TASK_TYPE_WEB_SOCKET = 12;
606    TASK_TYPE_POSTED_MESSAGE = 13;
607    TASK_TYPE_UNSHIPPED_PORT_MESSAGE = 14;
608    TASK_TYPE_FILE_READING = 15;
609    TASK_TYPE_DATABASE_ACCESS = 16;
610    TASK_TYPE_PRESENTATION = 17;
611    TASK_TYPE_SENSOR = 18;
612    TASK_TYPE_PERFORMANCE_TIMELINE = 19;
613    TASK_TYPE_WEB_GL = 20;
614    TASK_TYPE_IDLE_TASK = 21;
615    TASK_TYPE_MISC_PLATFORM_API = 22;
616    TASK_TYPE_INTERNAL_DEFAULT = 23;
617    TASK_TYPE_INTERNAL_LOADING = 24;
618
619    TASK_TYPE_INTERNAL_TEST = 26;
620    TASK_TYPE_INTERNAL_WEB_CRYPTO = 27;
621
622    TASK_TYPE_INTERNAL_MEDIA = 29;
623    TASK_TYPE_INTERNAL_MEDIA_REALTIME = 30;
624
625    TASK_TYPE_INTERNAL_USER_INTERACTION = 32;
626    TASK_TYPE_INTERNAL_INSPECTOR = 33;
627
628    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8 = 37;
629    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_COMPOSITOR = 38;
630    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_DEFAULT = 39;
631    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_INPUT = 40;
632    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IDLE = 41;
633
634    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_CONTROL = 43;
635    TASK_TYPE_INTERNAL_INTERSECTION_OBSERVER = 44;
636    TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_DEFAULT = 45;
637    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_DEFAULT = 46;
638    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_V8 = 47;
639    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_COMPOSITOR = 48;
640    TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_INPUT = 49;
641    TASK_TYPE_NETWORKING_WITH_URL_LOADER_ANNOTATION = 50;
642    TASK_TYPE_WORKER_ANIMATION = 51;
643
644    TASK_TYPE_INTERNAL_TRANSLATION = 55;
645    TASK_TYPE_FONT_LOADING = 56;
646    TASK_TYPE_APPLICATION_LIFECYCLE = 57;
647    TASK_TYPE_BACKGROUND_FETCH = 58;
648    TASK_TYPE_PERMISSION = 59;
649    TASK_TYPE_SERVICE_WORKER_CLIENT_MESSAGE = 60;
650    TASK_TYPE_INTERNAL_CONTENT_CAPTURE = 61;
651    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_MEMORY_PURGE = 62;
652    TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED = 63;
653    TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED_UNFREEZABLE = 64;
654    TASK_TYPE_INTERNAL_CONTINUE_SCRIPT_LOADING = 65;
655    TASK_TYPE_WEB_LOCKS = 66;
656    TASK_TYPE_WEB_SCHEDULING_POSTED_TASK = 67;
657    TASK_TYPE_INTERNAL_FRAME_LIFE_CYCLE_CONTROL = 68;
658    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_NON_WAKING = 69;
659    TASK_TYPE_INTERNAL_FIND_IN_PAGE = 70;
660    TASK_TYPE_INTERNAL_HIGH_PRIORITY_LOCAL_FRAME = 71;
661    TASK_TYPE_JAVASCRIPT_TIMER_IMMEDIATE = 72;
662    TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_LOW_NESTING = 73;
663    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IPC_TRACKING = 74;
664    TASK_TYPE_NETWORKING_UNFREEZABLE = 75;
665    TASK_TYPE_WAKE_LOCK = 76;
666    TASK_TYPE_INTERNAL_INPUT_BLOCKING = 77;
667    TASK_TYPE_WEB_GPU = 78;
668    TASK_TYPE_INTERNAL_POST_MESSAGE_FORWARDING = 79;
669  }
670
671  enum FrameType {
672    FRAME_TYPE_UNSPECIFIED = 0;
673    FRAME_TYPE_MAIN_FRAME = 1;
674    FRAME_TYPE_SAME_ORIGIN_SUBFRAME = 2;
675    FRAME_TYPE_CROSS_ORIGIN_SUBFRAME = 3;
676  }
677
678  optional TaskType task_type = 1;
679
680  // FrameScheduler related data
681  optional bool frame_visible = 2;
682  optional bool page_visible = 3;
683  optional FrameType frame_type = 4;
684}
685
686message EventLatency {
687  enum EventType {
688    EVENT_TYPE_UNSPECIFIED = 0;
689    MOUSE_PRESSED = 1;
690    MOUSE_RELEASED = 2;
691    MOUSE_WHEEL = 3;
692    KEY_PRESSED = 4;
693    KEY_RELEASED = 5;
694    TOUCH_PRESSED = 6;
695    TOUCH_RELEASED = 7;
696    TOUCH_MOVED = 8;
697    GESTURE_SCROLL_BEGIN = 9;
698    GESTURE_SCROLL_UPDATE = 10;
699    GESTURE_SCROLL_END = 11;
700    GESTURE_DOUBLE_TAP = 12;
701    GESTURE_LONG_PRESS = 13;
702    GESTURE_LONG_TAP = 14;
703    GESTURE_SHOW_PRESS = 15;
704    GESTURE_TAP = 16;
705    GESTURE_TAP_CANCEL = 17;
706    GESTURE_TAP_DOWN = 18;
707    GESTURE_TAP_UNCONFIRMED = 19;
708    GESTURE_TWO_FINGER_TAP = 20;
709    FIRST_GESTURE_SCROLL_UPDATE = 21;
710    MOUSE_DRAGGED = 22;
711    GESTURE_PINCH_BEGIN = 23;
712    GESTURE_PINCH_END = 24;
713    GESTURE_PINCH_UPDATE = 25;
714    INERTIAL_GESTURE_SCROLL_UPDATE = 26;
715  }
716
717  optional EventType event_type = 1;
718}
719
720message ProcessSingleton {
721  enum RemoteProcessInteractionResult {
722    INTERACTION_RESULT_UNSPECIFIED = 0;
723    TERMINATE_FAILED = 1;
724    REMOTE_PROCESS_NOT_FOUND = 2;
725    TERMINATE_WAIT_TIMEOUT = 3;
726    RUNNING_PROCESS_NOTIFY_ERROR = 4;
727    TERMINATE_NOT_ENOUGH_PERMISSIONS = 5;
728    REMOTE_PROCESS_SHUTTING_DOWN = 6;
729    PROFILE_UNLOCKED = 7;
730    PROFILE_UNLOCKED_BEFORE_KILL = 8;
731    SAME_BROWSER_INSTANCE = 9;
732    SAME_BROWSER_INSTANCE_BEFORE_KILL = 10;
733    FAILED_TO_EXTRACT_PID = 11;
734    INVALID_LOCK_FILE = 12;
735    ORPHANED_LOCK_FILE = 13;
736    USER_REFUSED_TERMINATION = 14;
737    TERMINATE_SUCCEEDED = 100;
738  }
739
740  enum RemoteHungProcessTerminateReason {
741    TERMINATE_REASON_UNSPECIFIED = 0;
742    USER_ACCEPTED_TERMINATION = 1;
743    NO_VISIBLE_WINDOW_FOUND = 2;
744    NOTIFY_ATTEMPTS_EXCEEDED = 3;
745    SOCKET_WRITE_FAILED = 4;
746    SOCKET_READ_FAILED = 5;
747  }
748
749  optional RemoteProcessInteractionResult remote_process_interaction_result = 1;
750  optional RemoteHungProcessTerminateReason remote_process_terminate_reason = 2;
751}
752
753message NavigationHandle {
754  optional int64 navigation_id = 1;
755  optional bool has_committed = 2;
756  optional bool is_error_page = 3;
757  optional FrameTreeNodeInfo frame_tree_node = 4;
758  optional RenderFrameHost render_frame_host = 5;
759
760  // Additional untyped debug information associated with this
761  // NavigationHandle/Request, populated via TracedProto::AddDebugAnnotations
762  // API.
763  repeated DebugAnnotation debug_annotations = 99;
764}
765
766enum DeviceThermalState {
767  DEVICE_THERMAL_STATE_UNKNOWN = 0;
768  DEVICE_THERMAL_STATE_NOMINAL = 1;
769  DEVICE_THERMAL_STATE_FAIR = 2;
770  DEVICE_THERMAL_STATE_SERIOUS = 3;
771  DEVICE_THERMAL_STATE_CRITICAL = 4;
772}
773
774message ChromeTrackEvent {
775  // Extension range for Chrome: 1000-1999
776  // Next ID: 1037
777  extend TrackEvent {
778    optional ChromeAppState chrome_app_state = 1000;
779
780    optional ChromeMemoryPressureNotification
781        chrome_memory_pressure_notification = 1001;
782
783    optional ChromeTaskAnnotator chrome_task_annotator = 1002;
784
785    optional ChromeBrowserContext chrome_browser_context = 1003;
786
787    optional ChromeProfileDestroyer chrome_profile_destroyer = 1004;
788
789    optional ChromeTaskPostedToDisabledQueue
790        chrome_task_posted_to_disabled_queue = 1005;
791
792    optional ChromeRasterTask chrome_raster_task = 1006;
793
794    optional ChromeMessagePumpForUI chrome_message_pump_for_ui = 1007;
795
796    optional RenderFrameImplDeletion render_frame_impl_deletion = 1008;
797
798    optional ShouldSwapBrowsingInstancesResult
799        should_swap_browsing_instances_result = 1009;
800
801    optional FrameTreeNodeInfo frame_tree_node_info = 1010;
802
803    optional ChromeHashedPerformanceMark chrome_hashed_performance_mark = 1011;
804
805    optional RenderProcessHost render_process_host = 1012;
806    optional RenderProcessHostCleanup render_process_host_cleanup = 1013;
807    optional RenderProcessHostListener render_process_host_listener_changed =
808        1014;
809    optional ChildProcessLauncherPriority child_process_launcher_priority =
810        1015;
811
812    optional ResourceBundle resource_bundle = 1016;
813
814    optional ChromeWebAppBadNavigate chrome_web_app_bad_navigate = 1017;
815
816    optional ChromeExtensionId chrome_extension_id = 1018;
817
818    optional SiteInstance site_instance = 1019;
819
820    optional RenderViewHost render_view_host = 1020;
821
822    optional RenderFrameProxyHost render_frame_proxy_host = 1021;
823
824    optional AndroidViewDump android_view_dump = 1022;
825
826    optional ParkableStringCompressInBackground
827        parkable_string_compress_in_background = 1023;
828    optional ParkableStringUnpark parkable_string_unpark = 1024;
829
830    optional ChromeSamplingProfilerSampleCollected
831        chrome_sampling_profiler_sample_completed = 1025;
832    optional SendBeginMainFrameToCommitBreakdown
833        send_begin_mainframe_to_commit_breakdown = 1026;
834
835    optional GlobalRenderFrameHostId global_render_frame_host_id = 1027;
836
837    optional RenderFrameHost render_frame_host = 1028;
838
839    optional ChromeThreadPoolTask thread_pool_task = 1029;
840
841    optional BackForwardCacheCanStoreDocumentResult
842        back_forward_cache_can_store_document_result = 1030;
843
844    optional RendererMainThreadTaskExecution
845        renderer_main_thread_task_execution = 1031;
846
847    optional EventLatency event_latency = 1032;
848
849    optional ProcessSingleton process_singleton = 1033;
850
851    optional SiteInstanceGroup site_instance_group = 1034;
852
853    optional BrowsingContextState browsing_context_state = 1035;
854
855    optional DeviceThermalState device_thermal_state = 1036;
856
857    optional NavigationHandle navigation = 1037;
858  }
859}
860