| Index: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
|
| index 0bac1809640546015d63cdf8f50dd00035dcefe7..f8a8fd6e514f20028a3b4b6969ee2f8c24e88e60 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js
|
| @@ -33,6 +33,7 @@ WebInspector.ServiceWorkersView.prototype = {
|
| if (this._manager || !target.serviceWorkerManager || !securityOriginManager)
|
| return;
|
| this._manager = target.serviceWorkerManager;
|
| + this._subTargetsManager = target.subTargetsManager;
|
| this._securityOriginManager = securityOriginManager;
|
|
|
| this._toolbar.appendToolbarItem(WebInspector.NetworkConditionsSelector.createOfflineToolbarCheckbox());
|
| @@ -108,7 +109,7 @@ WebInspector.ServiceWorkersView.prototype = {
|
| {
|
| var section = this._sections.get(registration);
|
| if (!section) {
|
| - section = new WebInspector.ServiceWorkersView.Section(this._manager, this._reportView.appendSection(""), registration);
|
| + section = new WebInspector.ServiceWorkersView.Section(this._manager, this._subTargetsManager, this._reportView.appendSection(""), registration);
|
| this._sections.set(registration, section);
|
| }
|
| this._updateSectionVisibility();
|
| @@ -133,12 +134,14 @@ WebInspector.ServiceWorkersView.prototype = {
|
| /**
|
| * @constructor
|
| * @param {!WebInspector.ServiceWorkerManager} manager
|
| + * @param {!WebInspector.SubTargetsManager} subTargetsManager
|
| * @param {!WebInspector.ReportView.Section} section
|
| * @param {!WebInspector.ServiceWorkerRegistration} registration
|
| */
|
| -WebInspector.ServiceWorkersView.Section = function(manager, section, registration)
|
| +WebInspector.ServiceWorkersView.Section = function(manager, subTargetsManager, section, registration)
|
| {
|
| this._manager = manager;
|
| + this._subTargetsManager = subTargetsManager;
|
| this._section = section;
|
| this._registration = registration;
|
|
|
| @@ -234,7 +237,7 @@ WebInspector.ServiceWorkersView.Section.prototype = {
|
| var clientLabelText = clientsList.createChild("div", "service-worker-client");
|
| if (this._clientInfoCache.has(client))
|
| this._updateClientInfo(clientLabelText, /** @type {!WebInspector.TargetInfo} */(this._clientInfoCache.get(client)));
|
| - this._manager.getTargetInfo(client, this._onClientInfo.bind(this, clientLabelText));
|
| + this._subTargetsManager.getTargetInfo(client, this._onClientInfo.bind(this, clientLabelText));
|
| }
|
| }
|
|
|
| @@ -334,7 +337,7 @@ WebInspector.ServiceWorkersView.Section.prototype = {
|
| */
|
| _updateClientInfo: function(element, targetInfo)
|
| {
|
| - if (!(targetInfo.isWebContents() || targetInfo.isFrame())) {
|
| + if (targetInfo.type !== TargetAgent.TargetType.Page && targetInfo.type !== TargetAgent.TargetType.Frame) {
|
| element.createTextChild(WebInspector.UIString("Worker: %s", targetInfo.url));
|
| return;
|
| }
|
| @@ -350,7 +353,7 @@ WebInspector.ServiceWorkersView.Section.prototype = {
|
| */
|
| _activateTarget: function(targetId)
|
| {
|
| - this._manager.activateTarget(targetId);
|
| + this._subTargetsManager.activateTarget(targetId);
|
| },
|
|
|
| _startButtonClicked: function()
|
|
|