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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 */ 103 */
104 _loadedWithCapabilities: function(callback) 104 _loadedWithCapabilities: function(callback)
105 { 105 {
106 if (this._connection.isClosed()) { 106 if (this._connection.isClosed()) {
107 callback(null); 107 callback(null);
108 return; 108 return;
109 } 109 }
110 110
111 /** @type {!WebInspector.ConsoleModel} */ 111 /** @type {!WebInspector.ConsoleModel} */
112 this.consoleModel = new WebInspector.ConsoleModel(this); 112 this.consoleModel = new WebInspector.ConsoleModel(this);
113
114 /** @type {!WebInspector.NetworkManager} */ 113 /** @type {!WebInspector.NetworkManager} */
115 this.networkManager = new WebInspector.NetworkManager(this); 114 this.networkManager = new WebInspector.NetworkManager(this);
116
117 /** @type {!WebInspector.ResourceTreeModel} */ 115 /** @type {!WebInspector.ResourceTreeModel} */
118 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this); 116 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this);
119 if (!WebInspector.resourceTreeModel)
120 WebInspector.resourceTreeModel = this.resourceTreeModel;
121
122 /** @type {!WebInspector.NetworkLog} */ 117 /** @type {!WebInspector.NetworkLog} */
123 this.networkLog = new WebInspector.NetworkLog(this); 118 this.networkLog = new WebInspector.NetworkLog(this);
124 if (!WebInspector.networkLog)
125 WebInspector.networkLog = this.networkLog;
126
127 /** @type {!WebInspector.DebuggerModel} */ 119 /** @type {!WebInspector.DebuggerModel} */
128 this.debuggerModel = new WebInspector.DebuggerModel(this); 120 this.debuggerModel = new WebInspector.DebuggerModel(this);
129 if (!WebInspector.debuggerModel)
130 WebInspector.debuggerModel = this.debuggerModel;
131
132 /** @type {!WebInspector.RuntimeModel} */ 121 /** @type {!WebInspector.RuntimeModel} */
133 this.runtimeModel = new WebInspector.RuntimeModel(this); 122 this.runtimeModel = new WebInspector.RuntimeModel(this);
134 if (!WebInspector.runtimeModel)
135 WebInspector.runtimeModel = this.runtimeModel;
136
137 /** @type {!WebInspector.DOMModel} */ 123 /** @type {!WebInspector.DOMModel} */
138 this.domModel = new WebInspector.DOMModel(this); 124 this.domModel = new WebInspector.DOMModel(this);
139
140 /** @type {!WebInspector.CSSStyleModel} */ 125 /** @type {!WebInspector.CSSStyleModel} */
141 this.cssModel = new WebInspector.CSSStyleModel(this); 126 this.cssModel = new WebInspector.CSSStyleModel(this);
142 if (!WebInspector.cssModel)
143 WebInspector.cssModel = this.cssModel;
144
145 /** @type {!WebInspector.WorkerManager} */ 127 /** @type {!WebInspector.WorkerManager} */
146 this.workerManager = new WebInspector.WorkerManager(this, this.hasCapabi lity(WebInspector.Target.Capabilities.CanInspectWorkers)); 128 this.workerManager = new WebInspector.WorkerManager(this, this.hasCapabi lity(WebInspector.Target.Capabilities.CanInspectWorkers));
147 if (!WebInspector.workerManager) 129 if (this.hasCapability(WebInspector.Target.Capabilities.CanProfilePower) ) {
148 WebInspector.workerManager = this.workerManager; 130 /** @type {!WebInspector.PowerProfiler} */
149 131 this.powerProfiler = new WebInspector.PowerProfiler(this);
150 if (this.hasCapability(WebInspector.Target.Capabilities.CanProfilePower) ) 132 }
151 WebInspector.powerProfiler = new WebInspector.PowerProfiler(this);
152
153 /** @type {!WebInspector.DatabaseModel} */ 133 /** @type {!WebInspector.DatabaseModel} */
154 this.databaseModel = new WebInspector.DatabaseModel(this); 134 this.databaseModel = new WebInspector.DatabaseModel(this);
155 if (!WebInspector.databaseModel)
156 WebInspector.databaseModel = this.databaseModel;
157
158 /** @type {!WebInspector.DOMStorageModel} */ 135 /** @type {!WebInspector.DOMStorageModel} */
159 this.domStorageModel = new WebInspector.DOMStorageModel(this); 136 this.domStorageModel = new WebInspector.DOMStorageModel(this);
160 if (!WebInspector.domStorageModel)
161 WebInspector.domStorageModel = this.domStorageModel;
162
163 /** @type {!WebInspector.CPUProfilerModel} */ 137 /** @type {!WebInspector.CPUProfilerModel} */
164 this.cpuProfilerModel = new WebInspector.CPUProfilerModel(this); 138 this.cpuProfilerModel = new WebInspector.CPUProfilerModel(this);
165 if (!WebInspector.cpuProfilerModel)
166 WebInspector.cpuProfilerModel = this.cpuProfilerModel;
167
168 /** @type {!WebInspector.HeapProfilerModel} */ 139 /** @type {!WebInspector.HeapProfilerModel} */
169 this.heapProfilerModel = new WebInspector.HeapProfilerModel(this); 140 this.heapProfilerModel = new WebInspector.HeapProfilerModel(this);
170
171 /** @type {!WebInspector.IndexedDBModel} */ 141 /** @type {!WebInspector.IndexedDBModel} */
172 this.indexedDBModel = new WebInspector.IndexedDBModel(this); 142 this.indexedDBModel = new WebInspector.IndexedDBModel(this);
173
174 /** @type {!WebInspector.LayerTreeModel} */ 143 /** @type {!WebInspector.LayerTreeModel} */
175 this.layerTreeModel = new WebInspector.LayerTreeModel(this); 144 this.layerTreeModel = new WebInspector.LayerTreeModel(this);
176
177 /** @type {!WebInspector.AnimationModel} */ 145 /** @type {!WebInspector.AnimationModel} */
178 this.animationModel = new WebInspector.AnimationModel(this); 146 this.animationModel = new WebInspector.AnimationModel(this);
179
180 if (WebInspector.isWorkerFrontend() && this.isWorkerTarget()) { 147 if (WebInspector.isWorkerFrontend() && this.isWorkerTarget()) {
181 /** @type {!WebInspector.ServiceWorkerCacheModel} */ 148 /** @type {!WebInspector.ServiceWorkerCacheModel} */
182 this.serviceWorkerCacheModel = new WebInspector.ServiceWorkerCacheMo del(this); 149 this.serviceWorkerCacheModel = new WebInspector.ServiceWorkerCacheMo del(this);
183 } 150 }
184 151
185 if (callback) 152 if (callback)
186 callback(this); 153 callback(this);
187 }, 154 },
188 155
189 /** 156 /**
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 /** 521 /**
555 * @param {!WebInspector.Target} target 522 * @param {!WebInspector.Target} target
556 */ 523 */
557 targetRemoved: function(target) { }, 524 targetRemoved: function(target) { },
558 } 525 }
559 526
560 /** 527 /**
561 * @type {!WebInspector.TargetManager} 528 * @type {!WebInspector.TargetManager}
562 */ 529 */
563 WebInspector.targetManager = new WebInspector.TargetManager(); 530 WebInspector.targetManager = new WebInspector.TargetManager();
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/SourceMap.js ('k') | Source/devtools/front_end/sdk/WorkerManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698