| 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 /** | 729 /** |
| 730 * @param {?WebInspector.EmulatedDevice} device | 730 * @param {?WebInspector.EmulatedDevice} device |
| 731 * @param {?WebInspector.EmulatedDevice.Mode} mode | 731 * @param {?WebInspector.EmulatedDevice.Mode} mode |
| 732 */ | 732 */ |
| 733 _deviceModeSelected: function(device, mode) | 733 _deviceModeSelected: function(device, mode) |
| 734 { | 734 { |
| 735 if (device && mode) { | 735 if (device && mode) { |
| 736 var orientation = device.orientationByName(mode.orientation); | 736 var orientation = device.orientationByName(mode.orientation); |
| 737 this._deviceInsets = new Insets(mode.pageRect.left, mode.pageRect.to
p, orientation.width - mode.pageRect.left - mode.pageRect.width, orientation.hei
ght - mode.pageRect.top - mode.pageRect.height); | 737 this._deviceInsets = mode.insets; |
| 738 } else { | 738 } else { |
| 739 this._deviceInsets = new Insets(0, 0, 0, 0); | 739 this._deviceInsets = new Insets(0, 0, 0, 0); |
| 740 } | 740 } |
| 741 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer.
Events.InsetsChanged, this._deviceInsets); | 741 this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer.
Events.InsetsChanged, this._deviceInsets); |
| 742 }, | 742 }, |
| 743 | 743 |
| 744 /** | 744 /** |
| 745 * @param {!EmulationAgent.Viewport=} viewport | 745 * @param {!EmulationAgent.Viewport=} viewport |
| 746 */ | 746 */ |
| 747 _viewportChanged: function(viewport) | 747 _viewportChanged: function(viewport) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 WebInspector.EmulationDispatcher.prototype = { | 823 WebInspector.EmulationDispatcher.prototype = { |
| 824 /** | 824 /** |
| 825 * @override | 825 * @override |
| 826 * @param {!EmulationAgent.Viewport=} viewport | 826 * @param {!EmulationAgent.Viewport=} viewport |
| 827 */ | 827 */ |
| 828 viewportChanged: function(viewport) | 828 viewportChanged: function(viewport) |
| 829 { | 829 { |
| 830 this._responsiveDesignView._viewportChanged(viewport); | 830 this._responsiveDesignView._viewportChanged(viewport); |
| 831 } | 831 } |
| 832 } | 832 } |
| OLD | NEW |