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"); | |
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 Loading... |
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 } |
OLD | NEW |