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

Side by Side Diff: Source/devtools/front_end/emulation/ResponsiveDesignView.js

Issue 1220643002: Revert of [DevTools] Implement screen orientation override. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/devtools/front_end/emulation/OverridesSupport.js ('k') | Source/devtools/protocol.json » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.OverridesSupport.PageResizer} 8 * @implements {WebInspector.OverridesSupport.PageResizer}
9 * @implements {WebInspector.TargetManager.Observer} 9 * @implements {WebInspector.TargetManager.Observer}
10 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 10 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 /** 728 /**
729 * @param {?WebInspector.EmulatedDevice} device 729 * @param {?WebInspector.EmulatedDevice} device
730 * @param {?WebInspector.EmulatedDevice.Mode} mode 730 * @param {?WebInspector.EmulatedDevice.Mode} mode
731 */ 731 */
732 _deviceModeSelected: function(device, mode) 732 _deviceModeSelected: function(device, mode)
733 { 733 {
734 if (device && mode) { 734 if (device && mode) {
735 var orientation = device.orientationByName(mode.orientation); 735 var orientation = device.orientationByName(mode.orientation);
736 this._deviceInsets = mode.insets; 736 this._deviceInsets = mode.insets;
737 WebInspector.overridesSupport.settings.screenOrientationOverride.set (mode.orientation == WebInspector.EmulatedDevice.Horizontal ? "landscapePrimary" : "portraitPrimary");
738 } else { 737 } else {
739 this._deviceInsets = new Insets(0, 0, 0, 0); 738 this._deviceInsets = new Insets(0, 0, 0, 0);
740 WebInspector.overridesSupport.settings.screenOrientationOverride.set ("");
741 } 739 }
742 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer. Events.InsetsChanged, this._deviceInsets); 740 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer. Events.InsetsChanged, this._deviceInsets);
743 }, 741 },
744 742
745 /** 743 /**
746 * @param {!EmulationAgent.Viewport=} viewport 744 * @param {!EmulationAgent.Viewport=} viewport
747 */ 745 */
748 _viewportChanged: function(viewport) 746 _viewportChanged: function(viewport)
749 { 747 {
750 if (viewport) { 748 if (viewport) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 WebInspector.EmulationDispatcher.prototype = { 822 WebInspector.EmulationDispatcher.prototype = {
825 /** 823 /**
826 * @override 824 * @override
827 * @param {!EmulationAgent.Viewport=} viewport 825 * @param {!EmulationAgent.Viewport=} viewport
828 */ 826 */
829 viewportChanged: function(viewport) 827 viewportChanged: function(viewport)
830 { 828 {
831 this._responsiveDesignView._viewportChanged(viewport); 829 this._responsiveDesignView._viewportChanged(viewport);
832 } 830 }
833 } 831 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/OverridesSupport.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698