| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index 043efca119ab19182f44b386ac8509aebb75a81f..266d5c1720f359aedc9402137514c18cb28e07f3 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -58,6 +58,7 @@
|
| #include "ui/gfx/image/image_png_rep.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| #include "ui/gfx/screen.h"
|
| +#include "ui/snapshot/snapshot.h"
|
|
|
| namespace content {
|
| WebContentsViewPort* CreateWebContentsView(
|
| @@ -1320,6 +1321,17 @@ void WebContentsViewAura::TakeFocus(bool reverse) {
|
| }
|
| }
|
|
|
| +bool WebContentsViewAura::GrabSnapshot(const std::string& format,
|
| + int quality,
|
| + double scale,
|
| + std::vector<uint8>* data) {
|
| + if (format != "png" || scale != 1) {
|
| + LOG(ERROR) << "Can only capture non-scaled PNG snapshots.";
|
| + return false;
|
| + }
|
| + return ui::GrabViewSnapshot(GetNativeView(), data, GetViewBounds());
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // WebContentsViewAura, OverscrollControllerDelegate implementation:
|
|
|
|
|