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

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

Issue 2722993002: [DevTools] Turn TracingManager into SDKModel. (Closed)
Patch Set: review comment Created 3 years, 9 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 * @unrestricted 8 * @unrestricted
9 */ 9 */
10 SDK.Target = class extends Protocol.TargetBase { 10 SDK.Target = class extends Protocol.TargetBase {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 this._targetManager.dispatchEventToListeners(SDK.TargetManager.Events.Inspec tedURLChanged, this); 179 this._targetManager.dispatchEventToListeners(SDK.TargetManager.Events.Inspec tedURLChanged, this);
180 if (!this._name) 180 if (!this._name)
181 this._targetManager.dispatchEventToListeners(SDK.TargetManager.Events.Name Changed, this); 181 this._targetManager.dispatchEventToListeners(SDK.TargetManager.Events.Name Changed, this);
182 } 182 }
183 }; 183 };
184 184
185 /** 185 /**
186 * @enum {number} 186 * @enum {number}
187 */ 187 */
188 SDK.Target.Capability = { 188 SDK.Target.Capability = {
189 Browser: 1, 189 Browser: 1 << 0,
190 DOM: 2, 190 DOM: 1 << 1,
191 JS: 4, 191 JS: 1 << 2,
192 Log: 8, 192 Log: 1 << 3,
193 Network: 16, 193 Network: 1 << 4,
194 Target: 32, 194 Target: 1 << 5,
195 ScreenCapture: 64, 195 ScreenCapture: 1 << 6,
196 Tracing: 1 << 7,
196 197
197 None: 0, 198 None: 0,
198 199
199 AllForTests: 127 200 AllForTests: (1 << 8) - 1
200 }; 201 };
201 202
202 /** 203 /**
203 * @unrestricted 204 * @unrestricted
204 */ 205 */
205 SDK.SDKObject = class extends Common.Object { 206 SDK.SDKObject = class extends Common.Object {
206 /** 207 /**
207 * @param {!SDK.Target} target 208 * @param {!SDK.Target} target
208 */ 209 */
209 constructor(target) { 210 constructor(target) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 * @param {number} capabilities 255 * @param {number} capabilities
255 */ 256 */
256 SDK.SDKModel.register = function(modelClass, capabilities) { 257 SDK.SDKModel.register = function(modelClass, capabilities) {
257 if (!SDK.SDKModel._capabilitiesByModelClass) 258 if (!SDK.SDKModel._capabilitiesByModelClass)
258 SDK.SDKModel._capabilitiesByModelClass = new Map(); 259 SDK.SDKModel._capabilitiesByModelClass = new Map();
259 SDK.SDKModel._capabilitiesByModelClass.set(modelClass, capabilities); 260 SDK.SDKModel._capabilitiesByModelClass.set(modelClass, capabilities);
260 }; 261 };
261 262
262 /** @type {!Map<function(new:SDK.SDKModel, !SDK.Target), number>} */ 263 /** @type {!Map<function(new:SDK.SDKModel, !SDK.Target), number>} */
263 SDK.SDKModel._capabilitiesByModelClass; 264 SDK.SDKModel._capabilitiesByModelClass;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698