chrome_track_event.proto 30 KB

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