Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerManager.js

Issue 2345873002: [Devtools] Add capability for the log domain (Closed)
Patch Set: [Devtools] Add capability for the log domain Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 this._agent = manager.target().serviceWorkerAgent(); 429 this._agent = manager.target().serviceWorkerAgent();
430 this._workerId = workerId; 430 this._workerId = workerId;
431 this._connection = new WebInspector.ServiceWorkerConnection(this._agent, wor kerId); 431 this._connection = new WebInspector.ServiceWorkerConnection(this._agent, wor kerId);
432 this._url = url; 432 this._url = url;
433 this._versionId = versionId; 433 this._versionId = versionId;
434 var parsedURL = url.asParsedURL(); 434 var parsedURL = url.asParsedURL();
435 this._name = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++WebInspector.ServiceWorker._lastAnonymousTargetId); 435 this._name = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++WebInspector.ServiceWorker._lastAnonymousTargetId);
436 this._scope = parsedURL ? parsedURL.host + parsedURL.folderPathComponents : ""; 436 this._scope = parsedURL ? parsedURL.host + parsedURL.folderPathComponents : "";
437 437
438 this._manager._workers.set(workerId, this); 438 this._manager._workers.set(workerId, this);
439 var capabilities = WebInspector.Target.Capability.Network | WebInspector.Tar get.Capability.Worker; 439 var capabilities =
440 WebInspector.Target.Capability.Log | WebInspector.Target.Capability.Netw ork |
441 WebInspector.Target.Capability.Worker;
440 this._target = WebInspector.targetManager.createTarget(this._name, capabilit ies, this._connection, manager.target()); 442 this._target = WebInspector.targetManager.createTarget(this._name, capabilit ies, this._connection, manager.target());
441 this._target[WebInspector.ServiceWorker.Symbol] = this; 443 this._target[WebInspector.ServiceWorker.Symbol] = this;
442 this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Eve nts.WorkersUpdated); 444 this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Eve nts.WorkersUpdated);
443 this._target.runtimeAgent().runIfWaitingForDebugger(); 445 this._target.runtimeAgent().runIfWaitingForDebugger();
444 } 446 }
445 447
446 WebInspector.ServiceWorker.Symbol = Symbol("serviceWorker"); 448 WebInspector.ServiceWorker.Symbol = Symbol("serviceWorker");
447 449
448 WebInspector.ServiceWorker._lastAnonymousTargetId = 0; 450 WebInspector.ServiceWorker._lastAnonymousTargetId = 0;
449 451
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 { 889 {
888 return this._isRedundant() && (!this.errors.length || this._deleting); 890 return this._isRedundant() && (!this.errors.length || this._deleting);
889 }, 891 },
890 892
891 clearErrors: function() 893 clearErrors: function()
892 { 894 {
893 this._fingerprint = Symbol("fingerprint"); 895 this._fingerprint = Symbol("fingerprint");
894 this.errors = []; 896 this.errors = [];
895 } 897 }
896 } 898 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698