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

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

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 {string} name 10 * @param {string} name
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return !!this._capabilities[capability]; 93 return !!this._capabilities[capability];
94 }, 94 },
95 95
96 /** 96 /**
97 * @param {function(!WebInspector.Target)=} callback 97 * @param {function(!WebInspector.Target)=} callback
98 */ 98 */
99 _loadedWithCapabilities: function(callback) 99 _loadedWithCapabilities: function(callback)
100 { 100 {
101 /** @type {!WebInspector.ConsoleModel} */ 101 /** @type {!WebInspector.ConsoleModel} */
102 this.consoleModel = new WebInspector.ConsoleModel(this); 102 this.consoleModel = new WebInspector.ConsoleModel(this);
103 // This and similar lines are needed for compatibility.
104 if (!WebInspector.consoleModel)
105 WebInspector.consoleModel = this.consoleModel;
106 103
107 /** @type {!WebInspector.NetworkManager} */ 104 /** @type {!WebInspector.NetworkManager} */
108 this.networkManager = new WebInspector.NetworkManager(this); 105 this.networkManager = new WebInspector.NetworkManager(this);
109 if (!WebInspector.networkManager) 106 if (!WebInspector.networkManager)
110 WebInspector.networkManager = this.networkManager; 107 WebInspector.networkManager = this.networkManager;
111 108
112 /** @type {!WebInspector.ResourceTreeModel} */ 109 /** @type {!WebInspector.ResourceTreeModel} */
113 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this); 110 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this);
114 if (!WebInspector.resourceTreeModel) 111 if (!WebInspector.resourceTreeModel)
115 WebInspector.resourceTreeModel = this.resourceTreeModel; 112 WebInspector.resourceTreeModel = this.resourceTreeModel;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 * @return {!Array.<!WebInspector.Target>} 308 * @return {!Array.<!WebInspector.Target>}
312 */ 309 */
313 targets: function() 310 targets: function()
314 { 311 {
315 return this._targets.slice(); 312 return this._targets.slice();
316 }, 313 },
317 314
318 /** 315 /**
319 * @return {?WebInspector.Target} 316 * @return {?WebInspector.Target}
320 */ 317 */
321 activeTarget: function() 318 mainTarget: function()
322 { 319 {
323 return this._targets[0]; 320 return this._targets[0];
324 } 321 }
325 } 322 }
326 323
327 /** 324 /**
328 * @interface 325 * @interface
329 */ 326 */
330 WebInspector.TargetManager.Observer = function() 327 WebInspector.TargetManager.Observer = function()
331 { 328 {
332 } 329 }
333 330
334 WebInspector.TargetManager.Observer.prototype = { 331 WebInspector.TargetManager.Observer.prototype = {
335 /** 332 /**
336 * @param {!WebInspector.Target} target 333 * @param {!WebInspector.Target} target
337 */ 334 */
338 targetAdded: function(target) { }, 335 targetAdded: function(target) { },
339 336
340 /** 337 /**
341 * @param {!WebInspector.Target} target 338 * @param {!WebInspector.Target} target
342 */ 339 */
343 targetRemoved: function(target) { }, 340 targetRemoved: function(target) { },
344 } 341 }
345 342
346 /** 343 /**
347 * @type {!WebInspector.TargetManager} 344 * @type {!WebInspector.TargetManager}
348 */ 345 */
349 WebInspector.targetManager = new WebInspector.TargetManager(); 346 WebInspector.targetManager = new WebInspector.TargetManager();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698