Index: ui/snapshot/snapshot.h |
diff --git a/ui/snapshot/snapshot.h b/ui/snapshot/snapshot.h |
index 3c83a929868843618bd72e43de9e5c9c662d7452..4b2733c1536b846fa85d51cd25dc3a6b2ce703a7 100644 |
--- a/ui/snapshot/snapshot.h |
+++ b/ui/snapshot/snapshot.h |
@@ -31,13 +31,16 @@ |
// used in a result of user action. Support for async vs synchronous |
// GrabWindowSnapshot differs by platform. To be most general, use the |
// synchronous function first and if it returns false call the async one. |
-SNAPSHOT_EXPORT bool GrabWindowSnapshot(gfx::NativeWindow window, |
- const gfx::Rect& snapshot_bounds, |
- gfx::Image* image); |
+SNAPSHOT_EXPORT bool GrabWindowSnapshot( |
+ gfx::NativeWindow window, |
+ std::vector<unsigned char>* png_representation, |
+ const gfx::Rect& snapshot_bounds); |
-SNAPSHOT_EXPORT bool GrabViewSnapshot(gfx::NativeView view, |
- const gfx::Rect& snapshot_bounds, |
- gfx::Image* image); |
+SNAPSHOT_EXPORT bool GrabViewSnapshot( |
+ gfx::NativeView view, |
+ std::vector<unsigned char>* png_representation, |
+ const gfx::Rect& snapshot_bounds); |
+ |
// These functions take a snapshot of |source_rect|, specified in layer space |
// coordinates (DIP for desktop, physical pixels for Android), and scale the |
@@ -51,20 +54,15 @@ |
scoped_refptr<base::TaskRunner> background_task_runner, |
const GrabWindowSnapshotAsyncCallback& callback); |
+typedef base::Callback<void(scoped_refptr<base::RefCountedBytes> png_data)> |
+ GrabWindowSnapshotAsyncPNGCallback; |
SNAPSHOT_EXPORT void GrabWindowSnapshotAsync( |
gfx::NativeWindow window, |
const gfx::Rect& source_rect, |
- const GrabWindowSnapshotAsyncCallback& callback); |
- |
+ scoped_refptr<base::TaskRunner> background_task_runner, |
+ const GrabWindowSnapshotAsyncPNGCallback& callback); |
SNAPSHOT_EXPORT void GrabViewSnapshotAsync( |
gfx::NativeView view, |
- const gfx::Rect& source_rect, |
- const GrabWindowSnapshotAsyncCallback& callback); |
- |
-typedef base::Callback<void(scoped_refptr<base::RefCountedMemory> png_data)> |
- GrabWindowSnapshotAsyncPNGCallback; |
-SNAPSHOT_EXPORT void GrabWindowSnapshotAsyncPNG( |
- gfx::NativeWindow window, |
const gfx::Rect& source_rect, |
scoped_refptr<base::TaskRunner> background_task_runner, |
const GrabWindowSnapshotAsyncPNGCallback& callback); |