Confirmed users
125
edits
Victor.porof (talk | contribs) |
m (→2. Telling the DevTools Frontend About the New Markers: update based on moved directories) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 47: | Line 47: | ||
===== Using ''<code>TimelineConsumers</code>'' ===== | ===== Using ''<code>TimelineConsumers</code>'' ===== | ||
A few static methods exist on the [https://dxr.mozilla.org/mozilla-central/source/docshell/base/timeline/TimelineConsumers.h?from=TimelineConsumers <code>TimelineConsumers</code>] class, like ''<code>AddMarkerForDocShell</code>'', ''<code> | A few static methods exist on the [https://dxr.mozilla.org/mozilla-central/source/docshell/base/timeline/TimelineConsumers.h?from=TimelineConsumers <code>TimelineConsumers</code>] class, like ''<code>AddMarkerForDocShell</code>'', ''<code>AddMarkerForDocShellsList</code>'', ''<code>AddMarkerForAllObservedDocShells</code>'' that give you fine grained control over creating the markers and what meta-data is attached to them. | ||
Example: | Example: | ||
| Line 55: | Line 55: | ||
== 2. Telling the DevTools Frontend About the New Markers == | == 2. Telling the DevTools Frontend About the New Markers == | ||
To get your new markers displayed in the performance tool's UI, edit the configuration data in '''<code> | To get your new markers displayed in the performance tool's UI, edit the configuration data in '''<code>devtools/client/performance/modules/markers.js</code>'''. | ||
Add a property to the '''<code>TIMELINE_BLUEPRINT</code>''' object. The property key should be the <code>const char *</code> literal that you added in step 1 ("Parse HTML" in our example). The new property should be an object with the following properties: | Add a property to the '''<code>TIMELINE_BLUEPRINT</code>''' object. The property key should be the <code>const char *</code> literal that you added in step 1 ("Parse HTML" in our example). The new property should be an object with the following properties: | ||