22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
44
5+ /// @docImport '../timeline_events_controller.dart';
6+ /// @docImport '../timeline_events_view.dart';
7+ library ;
8+
59import 'dart:async' ;
610import 'dart:ui_web' as ui_web;
711
@@ -29,15 +33,15 @@ const _debugUseLocalPerfetto = false;
2933///
3034/// A new instance of [PerfettoController] will be created for each connected
3135/// app and for each load of offline data. Each time [PerfettoController.init]
32- /// is called, we create a new [html.IFrameElement ] and register it to
33- /// [ PerfettoController.viewId] via
34- /// [ui_web.platformViewRegistry .registerViewFactory] . Each new [html.IFrameElement]
35- /// must have a unique id in the [PlatformViewRegistry] , which
36- /// [_viewIdIncrementer] is used to create.
36+ /// is called, we create a new [HTMLIFrameElement ] and register it to
37+ /// ` PerfettoController.viewId` via
38+ /// [ui_web.PlatformViewRegistry .registerViewFactory] . Each new
39+ /// [HTMLIFrameElement] must have a unique id in the
40+ /// [ui_web.PlatformViewRegistry] , which [ _viewIdIncrementer] is used to create.
3741var _viewIdIncrementer = 0 ;
3842
3943/// Events that are passed between DevTools and the embedded Perfetto iFrame via
40- /// [window .postMessage] .
44+ /// [Window .postMessage] .
4145enum EmbeddedPerfettoEvent {
4246 /// Id for an event Perfetto expects to verify the trace viewer is ready.
4347 ping ('PING' ),
@@ -54,7 +58,7 @@ enum EmbeddedPerfettoEvent {
5458 /// re-initialized.
5559 reloadCssConstants ('RELOAD-CSS-CONSTANTS' ),
5660
57- /// Id for a [ postMessage] request that is sent before trying to change the
61+ /// Id for a ` postMessage` request that is sent before trying to change the
5862 /// DevTools theme (see [devtoolsThemeChange] ).
5963 ///
6064 /// Once the DevTools theme handler in the bundled Perfetto web app has been
@@ -63,11 +67,11 @@ enum EmbeddedPerfettoEvent {
6367 ///
6468 /// This message must be sent with the argument 'perfettoIgnore' set to true
6569 /// so that the message handler in the Perfetto codebase
66- /// [ post_message_handler.ts] will not try to handle this message and warn
70+ /// ` post_message_handler.ts` will not try to handle this message and warn
6771 /// "Unknown postMessage() event received".
6872 devtoolsThemePing ('DART-DEVTOOLS-THEME-PING' ),
6973
70- /// Id for a [ postMessage] response that should be received when the DevTools
74+ /// Id for a ` postMessage` response that should be received when the DevTools
7175 /// theme handler has been registered.
7276 ///
7377 /// We will send a "ping" event [devtoolsThemePing] to the DevTools theme
@@ -76,11 +80,11 @@ enum EmbeddedPerfettoEvent {
7680 /// before we can send a theme change request [devtoolsThemeChange] .
7781 devtoolsThemePong ('DART-DEVTOOLS-THEME-PONG' ),
7882
79- /// Id for a [ postMessage] request that is sent on DevTools theme changes.
83+ /// Id for a ` postMessage` request that is sent on DevTools theme changes.
8084 ///
8185 /// This message must be sent with the argument 'perfettoIgnore' set to true
8286 /// so that the message handler in the Perfetto codebase
83- /// [ post_message_handler.ts] will not try to handle this message and warn
87+ /// ` post_message_handler.ts` will not try to handle this message and warn
8488 /// "Unknown postMessage() event received".
8589 devtoolsThemeChange ('DART-DEVTOOLS-THEME-CHANGE' );
8690
0 commit comments