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

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

Issue 1195793008: [DevTools] Implement screen orientation override. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Restore test 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");
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
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 }
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