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

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: WI.ParsedURL.platformPathToURL 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 _targetDisposed: function(event) 294 _targetDisposed: function(event)
281 { 295 {
282 var target = /** @type {!WebInspector.Target} */ (event.data); 296 var target = /** @type {!WebInspector.Target} */ (event.data);
283 if (target !== this._target) 297 if (target !== this._target)
284 return; 298 return;
285 this.dispose(); 299 this.dispose();
286 }, 300 },
287 301
288 __proto__: WebInspector.SDKObject.prototype 302 __proto__: WebInspector.SDKObject.prototype
289 } 303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698