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

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

Issue 1720973002: [DevTools] Add device type to custom device presets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {function()} updateCallback 7 * @param {function()} updateCallback
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.DeviceModeModel = function(updateCallback) 10 WebInspector.DeviceModeModel = function(updateCallback)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 /** @enum {string} */ 70 /** @enum {string} */
71 WebInspector.DeviceModeModel.Type = { 71 WebInspector.DeviceModeModel.Type = {
72 None: "None", 72 None: "None",
73 Responsive: "Responsive", 73 Responsive: "Responsive",
74 Device: "Device" 74 Device: "Device"
75 } 75 }
76 76
77 /** @enum {string} */ 77 /** @enum {string} */
78 WebInspector.DeviceModeModel.UA = { 78 WebInspector.DeviceModeModel.UA = {
79 Mobile: "Mobile", 79 Mobile: WebInspector.UIString("Mobile"),
80 MobileNoTouch: "MobileNoTouch", 80 MobileNoTouch: WebInspector.UIString("Mobile (no touch)"),
81 Desktop: "Desktop", 81 Desktop: WebInspector.UIString("Desktop"),
82 DesktopTouch: "DesktopTouch" 82 DesktopTouch: WebInspector.UIString("Desktop (touch)")
83 } 83 }
84 84
85 WebInspector.DeviceModeModel.MinDeviceSize = 50; 85 WebInspector.DeviceModeModel.MinDeviceSize = 50;
86 WebInspector.DeviceModeModel.MaxDeviceSize = 9999; 86 WebInspector.DeviceModeModel.MaxDeviceSize = 9999;
87 87
88 /** 88 /**
89 * @param {string} value 89 * @param {string} value
90 * @return {boolean} 90 * @return {boolean}
91 */ 91 */
92 WebInspector.DeviceModeModel.deviceSizeValidator = function(value) 92 WebInspector.DeviceModeModel.deviceSizeValidator = function(value)
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 if (!this._target || orientation === this._screenOrientation) 624 if (!this._target || orientation === this._screenOrientation)
625 return; 625 return;
626 626
627 this._screenOrientation = orientation; 627 this._screenOrientation = orientation;
628 if (!this._screenOrientation) 628 if (!this._screenOrientation)
629 this._target.screenOrientationAgent().clearScreenOrientationOverride (); 629 this._target.screenOrientationAgent().clearScreenOrientationOverride ();
630 else 630 else
631 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation)); 631 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation));
632 } 632 }
633 } 633 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698