| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js
|
| index faaa35bf0e6852eac439dc3aa9dff6b3f0d204fa..97b51d7a1c4954fc3f0beba0a8bf215cbaeb1111 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js
|
| @@ -35,6 +35,16 @@ Emulation.DeviceModeWrapper = class extends UI.VBox {
|
| }
|
|
|
| /**
|
| + * @return {boolean}
|
| + */
|
| + _captureFullHeightScreenshot() {
|
| + if (!this._deviceModeView)
|
| + return false;
|
| + this._deviceModeView.captureFullHeightScreenshot();
|
| + return true;
|
| + }
|
| +
|
| + /**
|
| * @param {boolean} force
|
| */
|
| _update(force) {
|
| @@ -49,12 +59,12 @@ Emulation.DeviceModeWrapper = class extends UI.VBox {
|
| if (!this._deviceModeView)
|
| this._deviceModeView = new Emulation.DeviceModeView();
|
| this._deviceModeView.show(this.element);
|
| - this._inspectedPagePlaceholder.clearMinimumSizeAndMargins();
|
| + this._inspectedPagePlaceholder.clearMinimumSize();
|
| this._inspectedPagePlaceholder.show(this._deviceModeView.element);
|
| } else {
|
| if (this._deviceModeView)
|
| this._deviceModeView.detach();
|
| - this._inspectedPagePlaceholder.restoreMinimumSizeAndMargins();
|
| + this._inspectedPagePlaceholder.restoreMinimumSize();
|
| this._inspectedPagePlaceholder.show(this.element);
|
| }
|
| }
|
| @@ -76,12 +86,17 @@ Emulation.DeviceModeWrapper.ActionDelegate = class {
|
| */
|
| handleAction(context, actionId) {
|
| if (Emulation.DeviceModeView._wrapperInstance) {
|
| - if (actionId === 'emulation.toggle-device-mode') {
|
| - Emulation.DeviceModeView._wrapperInstance._toggleDeviceMode();
|
| - return true;
|
| + switch (actionId) {
|
| + case 'emulation.capture-screenshot':
|
| + return Emulation.DeviceModeView._wrapperInstance._captureScreenshot();
|
| +
|
| + case 'emulation.capture-full-height-screenshot':
|
| + return Emulation.DeviceModeView._wrapperInstance._captureFullHeightScreenshot();
|
| +
|
| + case 'emulation.toggle-device-mode':
|
| + Emulation.DeviceModeView._wrapperInstance._toggleDeviceMode();
|
| + return true;
|
| }
|
| - if (actionId === 'emulation.capture-screenshot')
|
| - return Emulation.DeviceModeView._wrapperInstance._captureScreenshot();
|
| }
|
| return false;
|
| }
|
|
|