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

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

Issue 2422803002: DevTools: prefix node.js scripts's sourceURL with "file://" to make them a valid url (Closed)
Patch Set: better name Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @extends {Protocol.Agents} 9 * @extends {Protocol.Agents}
10 * @param {!WebInspector.TargetManager} targetManager 10 * @param {!WebInspector.TargetManager} targetManager
(...skipping 27 matching lines...) Expand all
38 JS: 4, 38 JS: 4,
39 Log: 8, 39 Log: 8,
40 Network: 16, 40 Network: 16,
41 Worker: 32 41 Worker: 32
42 }; 42 };
43 43
44 WebInspector.Target._nextId = 1; 44 WebInspector.Target._nextId = 1;
45 45
46 WebInspector.Target.prototype = { 46 WebInspector.Target.prototype = {
47 /** 47 /**
48 * @return {boolean}
49 */
50 isNodeJS: function()
51 {
52 // TODO(lushnikov): this is an unreliable way to detect Node.js targets.
53 return this._capabilitiesMask === WebInspector.Target.Capability.JS || t his._isNodeJSForTest;
54 },
55
56 setIsNodeJSForTest: function()
57 {
58 this._isNodeJSForTest = true;
59 },
60
61 /**
48 * @return {number} 62 * @return {number}
49 */ 63 */
50 id: function() 64 id: function()
51 { 65 {
52 return this._id; 66 return this._id;
53 }, 67 },
54 68
55 /** 69 /**
56 * @return {string} 70 * @return {string}
57 */ 71 */
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 { 301 {
288 var target = /** @type {!WebInspector.Target} */ (event.data); 302 var target = /** @type {!WebInspector.Target} */ (event.data);
289 if (target !== this._target) 303 if (target !== this._target)
290 return; 304 return;
291 this.dispose(); 305 this.dispose();
292 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage r.Events.TargetDisposed, this._targetDisposed, this); 306 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage r.Events.TargetDisposed, this._targetDisposed, this);
293 }, 307 },
294 308
295 __proto__: WebInspector.SDKObject.prototype 309 __proto__: WebInspector.SDKObject.prototype
296 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698