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 2fca7229288837bfeeef2ccd7dfc9b9b339a1708..f1cfe7f1c79a44a681a1dcfb0718064c65a5a039 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js |
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeWrapper.js |
@@ -30,6 +30,17 @@ WebInspector.DeviceModeWrapper.prototype = { |
}, |
/** |
+ * @return {boolean} |
+ */ |
+ _captureScreenshot: function() |
+ { |
+ if (!this._deviceModeView) |
+ return false; |
+ this._deviceModeView.captureScreenshot(); |
+ return true; |
+ }, |
+ |
+ /** |
* @param {boolean} force |
*/ |
_update: function(force) |
@@ -80,6 +91,8 @@ WebInspector.DeviceModeWrapper.ActionDelegate.prototype = { |
WebInspector.DeviceModeView._wrapperInstance._toggleDeviceMode(); |
return true; |
} |
+ if (actionId === "emulation.capture-screenshot") |
+ return WebInspector.DeviceModeView._wrapperInstance._captureScreenshot(); |
} |
return false; |
} |