| Index: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js
|
| index 3f8150ea4327e8378227213a5ba576985c74c7a9..d291d20e30412742c2ac29e64629bdd7ca43fbb9 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js
|
| @@ -56,6 +56,8 @@ function defineCommonExtensionSymbols(apiPrivate)
|
| NetworkRequestFinished: "network-request-finished",
|
| OpenResource: "open-resource",
|
| PanelSearch: "panel-search-",
|
| + RecordingStarted: "trace-recording-started-",
|
| + RecordingStopped: "trace-recording-stopped-",
|
| ResourceAdded: "resource-added",
|
| ResourceContentCommitted: "resource-content-committed",
|
| ViewShown: "view-shown-",
|
| @@ -66,6 +68,7 @@ function defineCommonExtensionSymbols(apiPrivate)
|
| AddAuditCategory: "addAuditCategory",
|
| AddAuditResult: "addAuditResult",
|
| AddRequestHeaders: "addRequestHeaders",
|
| + AddTraceProvider: "addTraceProvider",
|
| ApplyStyleSheet: "applyStyleSheet",
|
| CreatePanel: "createPanel",
|
| CreateSidebarPane: "createSidebarPane",
|
| @@ -177,6 +180,7 @@ function InspectorExtensionAPI()
|
| this.inspectedWindow = new InspectedWindow();
|
| this.panels = new Panels();
|
| this.network = new Network();
|
| + this.timeline = new Timeline();
|
| defineDeprecatedProperty(this, "webInspector", "resources", "network");
|
| }
|
|
|
| @@ -553,6 +557,36 @@ ButtonImpl.prototype = {
|
| /**
|
| * @constructor
|
| */
|
| +function Timeline()
|
| +{
|
| +}
|
| +
|
| +Timeline.prototype = {
|
| + /**
|
| + * @param {string} categoryName
|
| + * @param {string} categoryTooltip
|
| + * @return {!TraceProvider}
|
| + */
|
| + addTraceProvider: function(categoryName, categoryTooltip)
|
| + {
|
| + var id = "extension-timeline-category-" + extensionServer.nextObjectId();
|
| + extensionServer.sendRequest({ command: commands.AddTraceProvider, id: id, categoryName: categoryName, categoryTooltip: categoryTooltip});
|
| + return new TraceProvider(id);
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * @constructor
|
| + */
|
| +function TraceProvider(id)
|
| +{
|
| + this.onRecordingStarted = new EventSink(events.RecordingStarted + id);
|
| + this.onRecordingStopped = new EventSink(events.RecordingStopped + id);
|
| +}
|
| +
|
| +/**
|
| + * @constructor
|
| + */
|
| function Audits()
|
| {
|
| }
|
|
|