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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js

Issue 2609353002: DevTools: Remove left margin when DevTools is docked (Closed)
Patch Set: Use css Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Emulation.DeviceModeWrapper = class extends UI.VBox { 7 Emulation.DeviceModeWrapper = class extends UI.VBox {
8 /** 8 /**
9 * @param {!Emulation.InspectedPagePlaceholder} inspectedPagePlaceholder 9 * @param {!Emulation.InspectedPagePlaceholder} inspectedPagePlaceholder
10 */ 10 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (!force) { 42 if (!force) {
43 var showing = this._deviceModeView && this._deviceModeView.isShowing(); 43 var showing = this._deviceModeView && this._deviceModeView.isShowing();
44 if (this._showDeviceModeSetting.get() === showing) 44 if (this._showDeviceModeSetting.get() === showing)
45 return; 45 return;
46 } 46 }
47 47
48 if (this._showDeviceModeSetting.get()) { 48 if (this._showDeviceModeSetting.get()) {
49 if (!this._deviceModeView) 49 if (!this._deviceModeView)
50 this._deviceModeView = new Emulation.DeviceModeView(); 50 this._deviceModeView = new Emulation.DeviceModeView();
51 this._deviceModeView.show(this.element); 51 this._deviceModeView.show(this.element);
52 this._inspectedPagePlaceholder.clearMinimumSizeAndMargins(); 52 this._inspectedPagePlaceholder.clearMinimumSize();
53 this._inspectedPagePlaceholder.show(this._deviceModeView.element); 53 this._inspectedPagePlaceholder.show(this._deviceModeView.element);
54 } else { 54 } else {
55 if (this._deviceModeView) 55 if (this._deviceModeView)
56 this._deviceModeView.detach(); 56 this._deviceModeView.detach();
57 this._inspectedPagePlaceholder.restoreMinimumSizeAndMargins(); 57 this._inspectedPagePlaceholder.restoreMinimumSize();
58 this._inspectedPagePlaceholder.show(this.element); 58 this._inspectedPagePlaceholder.show(this.element);
59 } 59 }
60 } 60 }
61 }; 61 };
62 62
63 /** @type {!Emulation.DeviceModeWrapper} */ 63 /** @type {!Emulation.DeviceModeWrapper} */
64 Emulation.DeviceModeView._wrapperInstance; 64 Emulation.DeviceModeView._wrapperInstance;
65 65
66 /** 66 /**
67 * @implements {UI.ActionDelegate} 67 * @implements {UI.ActionDelegate}
(...skipping 11 matching lines...) Expand all
79 if (actionId === 'emulation.toggle-device-mode') { 79 if (actionId === 'emulation.toggle-device-mode') {
80 Emulation.DeviceModeView._wrapperInstance._toggleDeviceMode(); 80 Emulation.DeviceModeView._wrapperInstance._toggleDeviceMode();
81 return true; 81 return true;
82 } 82 }
83 if (actionId === 'emulation.capture-screenshot') 83 if (actionId === 'emulation.capture-screenshot')
84 return Emulation.DeviceModeView._wrapperInstance._captureScreenshot(); 84 return Emulation.DeviceModeView._wrapperInstance._captureScreenshot();
85 } 85 }
86 return false; 86 return false;
87 } 87 }
88 }; 88 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698