Chromium Code Reviews| 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 54df762fd9b4306d512d0612a29476592a412acf..a3135fb7ceb5a0009a2ae2fdfe3bda1f6923c42e 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js |
| @@ -25,22 +25,16 @@ Emulation.DeviceModeWrapper = class extends UI.VBox { |
| } |
| /** |
| - * @return {boolean} |
|
dgozman
2017/04/21 20:40:54
Keep the annotation.
pfeldman
2017/04/21 20:51:35
Done.
|
| - */ |
| - _captureScreenshot() { |
| - if (!this._deviceModeView) |
| - return false; |
| - this._deviceModeView.captureScreenshot(); |
| - return true; |
| - } |
| - |
| - /** |
| - * @return {boolean} |
| + * @param {boolean=} fullSize |
| */ |
| - _captureFullSizeScreenshot() { |
| + _captureScreenshot(fullSize) { |
| if (!this._deviceModeView) |
| - return false; |
| - this._deviceModeView.captureFullSizeScreenshot(); |
| + this._deviceModeView = new Emulation.DeviceModeView(); |
| + this._deviceModeView.setNonEmulatedAvailableSize(this._inspectedPagePlaceholder.element); |
| + if (fullSize) |
| + this._deviceModeView.captureFullSizeScreenshot(); |
| + else |
| + this._deviceModeView.captureScreenshot(); |
| return true; |
| } |
| @@ -91,7 +85,7 @@ Emulation.DeviceModeWrapper.ActionDelegate = class { |
| return Emulation.DeviceModeView._wrapperInstance._captureScreenshot(); |
| case 'emulation.capture-full-height-screenshot': |
| - return Emulation.DeviceModeView._wrapperInstance._captureFullSizeScreenshot(); |
| + return Emulation.DeviceModeView._wrapperInstance._captureScreenshot(true); |
| case 'emulation.toggle-device-mode': |
| Emulation.DeviceModeView._wrapperInstance._toggleDeviceMode(); |