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

Unified Diff: ui/snapshot/snapshot.h

Issue 2650903003: Revert of [devtools] Support different encodings for Page.CaptureScreenshot. (Closed)
Patch Set: 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 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);
« 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