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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js

Issue 2672983002: [DevTools] Separate ScreenCaptureModel out of ResourceTreeModel. (Closed)
Patch Set: rebased Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Emulation.DeviceModeModel = class { 8 Emulation.DeviceModeModel = class {
9 /** 9 /**
10 * @param {function()} updateCallback 10 * @param {function()} updateCallback
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 /** 326 /**
327 * @override 327 * @override
328 * @param {!SDK.Target} target 328 * @param {!SDK.Target} target
329 */ 329 */
330 targetRemoved(target) { 330 targetRemoved(target) {
331 if (this._target === target) 331 if (this._target === target)
332 this._target = null; 332 this._target = null;
333 } 333 }
334 334
335 /**
336 * @return {?SDK.Target}
337 */
338 target() {
339 return this._target;
340 }
341
335 _scaleSettingChanged() { 342 _scaleSettingChanged() {
336 this._calculateAndEmulate(false); 343 this._calculateAndEmulate(false);
337 } 344 }
338 345
339 _widthSettingChanged() { 346 _widthSettingChanged() {
340 this._calculateAndEmulate(false); 347 this._calculateAndEmulate(false);
341 } 348 }
342 349
343 _heightSettingChanged() { 350 _heightSettingChanged() {
344 this._calculateAndEmulate(false); 351 this._calculateAndEmulate(false);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 639
633 Emulation.DeviceModeModel.MinDeviceSize = 50; 640 Emulation.DeviceModeModel.MinDeviceSize = 50;
634 Emulation.DeviceModeModel.MaxDeviceSize = 9999; 641 Emulation.DeviceModeModel.MaxDeviceSize = 9999;
635 642
636 643
637 Emulation.DeviceModeModel._defaultMobileUserAgent = 644 Emulation.DeviceModeModel._defaultMobileUserAgent =
638 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 ( KHTML, like Gecko) Chrome/%s Mobile Safari/537.36'; 645 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 ( KHTML, like Gecko) Chrome/%s Mobile Safari/537.36';
639 Emulation.DeviceModeModel._defaultMobileUserAgent = 646 Emulation.DeviceModeModel._defaultMobileUserAgent =
640 SDK.MultitargetNetworkManager.patchUserAgentWithChromeVersion(Emulation.Devi ceModeModel._defaultMobileUserAgent); 647 SDK.MultitargetNetworkManager.patchUserAgentWithChromeVersion(Emulation.Devi ceModeModel._defaultMobileUserAgent);
641 Emulation.DeviceModeModel.defaultMobileScaleFactor = 2; 648 Emulation.DeviceModeModel.defaultMobileScaleFactor = 2;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698