Index: ui/snapshot/snapshot_aura.cc |
diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc |
index 0ff547c1240a597f075ac2a78e1ec795e733d9ef..d2df3f08f2aee04e22bc93ee62bd50ef7a0a145c 100644 |
--- a/ui/snapshot/snapshot_aura.cc |
+++ b/ui/snapshot/snapshot_aura.cc |
@@ -22,14 +22,14 @@ |
namespace ui { |
bool GrabViewSnapshot(gfx::NativeView view, |
- const gfx::Rect& snapshot_bounds, |
- gfx::Image* image) { |
- return GrabWindowSnapshot(view, snapshot_bounds, image); |
+ std::vector<unsigned char>* png_representation, |
+ const gfx::Rect& snapshot_bounds) { |
+ return GrabWindowSnapshot(view, png_representation, snapshot_bounds); |
} |
bool GrabWindowSnapshot(gfx::NativeWindow window, |
- const gfx::Rect& snapshot_bounds, |
- gfx::Image* image) { |
+ std::vector<unsigned char>* png_representation, |
+ const gfx::Rect& snapshot_bounds) { |
// Not supported in Aura. Callers should fall back to the async version. |
return false; |
} |
@@ -94,18 +94,22 @@ |
background_task_runner)); |
} |
-void GrabWindowSnapshotAsync(gfx::NativeWindow window, |
- const gfx::Rect& source_rect, |
- const GrabWindowSnapshotAsyncCallback& callback) { |
- MakeInitialAsyncCopyRequest( |
- window, source_rect, |
- base::Bind(&SnapshotAsync::RunCallbackWithCopyOutputResult, callback)); |
+void GrabWindowSnapshotAsync( |
+ gfx::NativeWindow window, |
+ const gfx::Rect& source_rect, |
+ scoped_refptr<base::TaskRunner> background_task_runner, |
+ const GrabWindowSnapshotAsyncPNGCallback& callback) { |
+ MakeInitialAsyncCopyRequest(window, source_rect, |
+ base::Bind(&SnapshotAsync::EncodeCopyOutputResult, |
+ callback, background_task_runner)); |
} |
-void GrabViewSnapshotAsync(gfx::NativeView view, |
- const gfx::Rect& source_rect, |
- const GrabWindowSnapshotAsyncCallback& callback) { |
- GrabWindowSnapshotAsync(view, source_rect, callback); |
+void GrabViewSnapshotAsync( |
+ gfx::NativeView view, |
+ const gfx::Rect& source_rect, |
+ scoped_refptr<base::TaskRunner> background_task_runner, |
+ const GrabWindowSnapshotAsyncPNGCallback& callback) { |
+ GrabWindowSnapshotAsync(view, source_rect, background_task_runner, callback); |
} |