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

Unified Diff: ui/snapshot/snapshot.h

Issue 2592983002: [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: Disabled test on MacOS >=10.11, added ref to bug. 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
« no previous file with comments | « ui/snapshot/screenshot_grabber.cc ('k') | ui/snapshot/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot.h
diff --git a/ui/snapshot/snapshot.h b/ui/snapshot/snapshot.h
index 4b2733c1536b846fa85d51cd25dc3a6b2ce703a7..3c83a929868843618bd72e43de9e5c9c662d7452 100644
--- a/ui/snapshot/snapshot.h
+++ b/ui/snapshot/snapshot.h
@@ -31,16 +31,13 @@ namespace ui {
// 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,
- std::vector<unsigned char>* png_representation,
- const gfx::Rect& snapshot_bounds);
-
-SNAPSHOT_EXPORT bool GrabViewSnapshot(
- gfx::NativeView view,
- std::vector<unsigned char>* png_representation,
- const gfx::Rect& snapshot_bounds);
+SNAPSHOT_EXPORT bool GrabWindowSnapshot(gfx::NativeWindow window,
+ const gfx::Rect& snapshot_bounds,
+ gfx::Image* image);
+SNAPSHOT_EXPORT bool GrabViewSnapshot(gfx::NativeView view,
+ const gfx::Rect& snapshot_bounds,
+ gfx::Image* image);
// These functions take a snapshot of |source_rect|, specified in layer space
// coordinates (DIP for desktop, physical pixels for Android), and scale the
@@ -54,16 +51,21 @@ SNAPSHOT_EXPORT void GrabWindowSnapshotAndScaleAsync(
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,
- scoped_refptr<base::TaskRunner> background_task_runner,
- const GrabWindowSnapshotAsyncPNGCallback& callback);
+ const GrabWindowSnapshotAsyncCallback& 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);
« no previous file with comments | « ui/snapshot/screenshot_grabber.cc ('k') | ui/snapshot/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698