Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1202)

Unified Diff: ui/snapshot/snapshot_aura.cc

Issue 2592983002: [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Wait for load in CaptureScreenshotTest to fix android bot. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/snapshot/snapshot_aura.cc
diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc
index d2df3f08f2aee04e22bc93ee62bd50ef7a0a145c..19e2f1c309ee566c2f17ae72742ffb4bbf64c684 100644
--- a/ui/snapshot/snapshot_aura.cc
+++ b/ui/snapshot/snapshot_aura.cc
@@ -22,13 +22,13 @@
namespace ui {
bool GrabViewSnapshot(gfx::NativeView view,
- std::vector<unsigned char>* png_representation,
+ gfx::Image* image,
const gfx::Rect& snapshot_bounds) {
- return GrabWindowSnapshot(view, png_representation, snapshot_bounds);
+ return GrabWindowSnapshot(view, image, snapshot_bounds);
}
bool GrabWindowSnapshot(gfx::NativeWindow window,
- std::vector<unsigned char>* png_representation,
+ gfx::Image* image,
const gfx::Rect& snapshot_bounds) {
// Not supported in Aura. Callers should fall back to the async version.
return false;
@@ -94,22 +94,18 @@ void GrabWindowSnapshotAndScaleAsync(
background_task_runner));
}
-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 GrabWindowSnapshotAsync(gfx::NativeWindow window,
+ const gfx::Rect& source_rect,
+ const GrabWindowSnapshotAsyncCallback& callback) {
+ MakeInitialAsyncCopyRequest(
+ window, source_rect,
+ base::Bind(&SnapshotAsync::RunCallbackWithCopyOutputResult, 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);
+void GrabViewSnapshotAsync(gfx::NativeView view,
+ const gfx::Rect& source_rect,
+ const GrabWindowSnapshotAsyncCallback& callback) {
+ GrabWindowSnapshotAsync(view, source_rect, callback);
}

Powered by Google App Engine
This is Rietveld 408576698