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

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

Issue 2843763004: [DevTools] Introduce EmulationModel which will encapsulate emulation (Closed)
Patch Set: +throttling Created 3 years, 7 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 */ 201 */
202 SDK.Target.Capability = { 202 SDK.Target.Capability = {
203 Browser: 1 << 0, 203 Browser: 1 << 0,
204 DOM: 1 << 1, 204 DOM: 1 << 1,
205 JS: 1 << 2, 205 JS: 1 << 2,
206 Log: 1 << 3, 206 Log: 1 << 3,
207 Network: 1 << 4, 207 Network: 1 << 4,
208 Target: 1 << 5, 208 Target: 1 << 5,
209 ScreenCapture: 1 << 6, 209 ScreenCapture: 1 << 6,
210 Tracing: 1 << 7, 210 Tracing: 1 << 7,
211 TouchEmulation: 1 << 8, 211 Emulation: 1 << 8,
212 Security: 1 << 9, 212 Security: 1 << 9,
213 Input: 1 << 10, 213 Input: 1 << 10,
214 Inspector: 1 << 11, 214 Inspector: 1 << 11,
215 DeviceEmulation: 1 << 12,
215 216
216 None: 0, 217 None: 0,
217 218
218 AllForTests: (1 << 12) - 1 219 AllForTests: (1 << 13) - 1
219 }; 220 };
220 221
221 /** 222 /**
222 * @unrestricted 223 * @unrestricted
223 */ 224 */
224 SDK.SDKModel = class extends Common.Object { 225 SDK.SDKModel = class extends Common.Object {
225 /** 226 /**
226 * @param {!SDK.Target} target 227 * @param {!SDK.Target} target
227 */ 228 */
228 constructor(target) { 229 constructor(target) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 * @param {boolean} autostart 263 * @param {boolean} autostart
263 */ 264 */
264 SDK.SDKModel.register = function(modelClass, capabilities, autostart) { 265 SDK.SDKModel.register = function(modelClass, capabilities, autostart) {
265 if (!SDK.SDKModel._registeredModels) 266 if (!SDK.SDKModel._registeredModels)
266 SDK.SDKModel._registeredModels = new Map(); 267 SDK.SDKModel._registeredModels = new Map();
267 SDK.SDKModel._registeredModels.set(modelClass, {capabilities: capabilities, au tostart: autostart}); 268 SDK.SDKModel._registeredModels.set(modelClass, {capabilities: capabilities, au tostart: autostart});
268 }; 269 };
269 270
270 /** @type {!Map<function(new:SDK.SDKModel, !SDK.Target), !{capabilities: number, autostart: boolean}>} */ 271 /** @type {!Map<function(new:SDK.SDKModel, !SDK.Target), !{capabilities: number, autostart: boolean}>} */
271 SDK.SDKModel._registeredModels; 272 SDK.SDKModel._registeredModels;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698