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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/WorkerManager.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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 * @param {string} url 94 * @param {string} url
95 * @param {boolean} waitingForDebugger 95 * @param {boolean} waitingForDebugger
96 */ 96 */
97 _workerCreated: function(workerId, url, waitingForDebugger) 97 _workerCreated: function(workerId, url, waitingForDebugger)
98 { 98 {
99 var connection = new WebInspector.WorkerConnection(this, workerId); 99 var connection = new WebInspector.WorkerConnection(this, workerId);
100 this._connections.set(workerId, connection); 100 this._connections.set(workerId, connection);
101 101
102 var parsedURL = url.asParsedURL(); 102 var parsedURL = url.asParsedURL();
103 var workerName = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++this._lastAnonymousTargetId); 103 var workerName = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++this._lastAnonymousTargetId);
104 var target = WebInspector.targetManager.createTarget(workerName, WebInsp ector.Target.Capability.JS, connection, this.target()); 104 var target = WebInspector.targetManager.createTarget(workerName, WebInsp ector.Target.Capability.JS | WebInspector.Target.Capability.Log, connection, thi s.target());
105 this._targetsByWorkerId.set(workerId, target); 105 this._targetsByWorkerId.set(workerId, target);
106 106
107 // Only pause new worker if debugging SW - we are going through the 107 // Only pause new worker if debugging SW - we are going through the
108 // pause on start checkbox. 108 // pause on start checkbox.
109 var mainIsServiceWorker = WebInspector.targetManager.mainTarget().hasWor kerCapability() && !WebInspector.targetManager.mainTarget().hasBrowserCapability (); 109 var mainIsServiceWorker = WebInspector.targetManager.mainTarget().hasWor kerCapability() && !WebInspector.targetManager.mainTarget().hasBrowserCapability ();
110 if (mainIsServiceWorker && waitingForDebugger) 110 if (mainIsServiceWorker && waitingForDebugger)
111 target.debuggerAgent().pause(); 111 target.debuggerAgent().pause();
112 target.runtimeAgent().runIfWaitingForDebugger(); 112 target.runtimeAgent().runIfWaitingForDebugger();
113 }, 113 },
114 114
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb ject)); 223 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb ject));
224 }, 224 },
225 225
226 _close: function() 226 _close: function()
227 { 227 {
228 this.connectionClosed("worker_terminated"); 228 this.connectionClosed("worker_terminated");
229 }, 229 },
230 230
231 __proto__: InspectorBackendClass.Connection.prototype 231 __proto__: InspectorBackendClass.Connection.prototype
232 } 232 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698