OLD | NEW |
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 Loading... |
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"); |
737 } else { | 738 } else { |
738 this._deviceInsets = new Insets(0, 0, 0, 0); | 739 this._deviceInsets = new Insets(0, 0, 0, 0); |
| 740 WebInspector.overridesSupport.settings.screenOrientationOverride.set
(""); |
739 } | 741 } |
740 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer.
Events.InsetsChanged, this._deviceInsets); | 742 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer.
Events.InsetsChanged, this._deviceInsets); |
741 }, | 743 }, |
742 | 744 |
743 /** | 745 /** |
744 * @param {!EmulationAgent.Viewport=} viewport | 746 * @param {!EmulationAgent.Viewport=} viewport |
745 */ | 747 */ |
746 _viewportChanged: function(viewport) | 748 _viewportChanged: function(viewport) |
747 { | 749 { |
748 if (viewport) { | 750 if (viewport) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 WebInspector.EmulationDispatcher.prototype = { | 824 WebInspector.EmulationDispatcher.prototype = { |
823 /** | 825 /** |
824 * @override | 826 * @override |
825 * @param {!EmulationAgent.Viewport=} viewport | 827 * @param {!EmulationAgent.Viewport=} viewport |
826 */ | 828 */ |
827 viewportChanged: function(viewport) | 829 viewportChanged: function(viewport) |
828 { | 830 { |
829 this._responsiveDesignView._viewportChanged(viewport); | 831 this._responsiveDesignView._viewportChanged(viewport); |
830 } | 832 } |
831 } | 833 } |
OLD | NEW |