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

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

Issue 2383743003: [DevTools] Auto-attach to cross-process subframes under experiment. (Closed)
Patch Set: some ui 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 id: function() 50 id: function()
51 { 51 {
52 return this._id; 52 return this._id;
53 }, 53 },
54 54
55 /** 55 /**
56 * @return {string} 56 * @return {string}
57 */ 57 */
58 name: function() 58 name: function()
59 { 59 {
60 return this._name; 60 return this._name || this._inspectedURLName;
61 }, 61 },
62 62
63 /** 63 /**
64 * @return {!WebInspector.TargetManager} 64 * @return {!WebInspector.TargetManager}
65 */ 65 */
66 targetManager: function() 66 targetManager: function()
67 { 67 {
68 return this._targetManager; 68 return this._targetManager;
69 }, 69 },
70 70
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 { 206 {
207 return this._inspectedURL; 207 return this._inspectedURL;
208 }, 208 },
209 209
210 /** 210 /**
211 * @param {string} inspectedURL 211 * @param {string} inspectedURL
212 */ 212 */
213 setInspectedURL: function(inspectedURL) 213 setInspectedURL: function(inspectedURL)
214 { 214 {
215 this._inspectedURL = inspectedURL; 215 this._inspectedURL = inspectedURL;
216 InspectorFrontendHost.inspectedURLChanged(inspectedURL || ""); 216 var parsedURL = inspectedURL.asParsedURL();
217 this._inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFrag ment() : "#" + this._id;
218 if (!this.parentTarget())
219 InspectorFrontendHost.inspectedURLChanged(inspectedURL || "");
217 this._targetManager.dispatchEventToListeners(WebInspector.TargetManager. Events.InspectedURLChanged, this); 220 this._targetManager.dispatchEventToListeners(WebInspector.TargetManager. Events.InspectedURLChanged, this);
221 if (!this._name)
222 this._targetManager.dispatchEventToListeners(WebInspector.TargetMana ger.Events.NameChanged, this);
218 }, 223 },
219 224
220 __proto__: Protocol.Agents.prototype 225 __proto__: Protocol.Agents.prototype
221 } 226 }
222 227
223 /** 228 /**
224 * @constructor 229 * @constructor
225 * @extends {WebInspector.Object} 230 * @extends {WebInspector.Object}
226 * @param {!WebInspector.Target} target 231 * @param {!WebInspector.Target} target
227 */ 232 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 { 287 {
283 var target = /** @type {!WebInspector.Target} */ (event.data); 288 var target = /** @type {!WebInspector.Target} */ (event.data);
284 if (target !== this._target) 289 if (target !== this._target)
285 return; 290 return;
286 this.dispose(); 291 this.dispose();
287 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage r.Events.TargetDisposed, this._targetDisposed, this); 292 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage r.Events.TargetDisposed, this._targetDisposed, this);
288 }, 293 },
289 294
290 __proto__: WebInspector.SDKObject.prototype 295 __proto__: WebInspector.SDKObject.prototype
291 } 296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698