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

Unified Diff: ui/snapshot/snapshot.h

Issue 127103002: Make WindowReachedScreen support async readback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac /o\ Created 6 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 | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | ui/snapshot/snapshot_android.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 53a698323a396f920471f6040faaa5f462aa978a..e547e4748ddaf77b8a4e150f420556bbe3726e0c 100644
--- a/ui/snapshot/snapshot.h
+++ b/ui/snapshot/snapshot.h
@@ -28,8 +28,9 @@ namespace ui {
// Grabs a snapshot of the window/view. No security checks are done. This is
// intended to be used for debugging purposes where no BrowserProcess instance
// is available (ie. tests). This function is synchronous, so it should NOT be
-// used in a result of user action. Use asynchronous GrabWindowSnapshotAsync()
-// instead on supported platforms.
+// 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,
@@ -58,6 +59,11 @@ SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
const gfx::Rect& source_rect,
scoped_refptr<base::TaskRunner> background_task_runner,
const GrabWindowSnapshotAsyncPNGCallback& callback);
+SNAPSHOT_EXPORT void GrabViewSnapshotAsync(
+ gfx::NativeView view,
+ const gfx::Rect& source_rect,
+ scoped_refptr<base::TaskRunner> background_task_runner,
+ const GrabWindowSnapshotAsyncPNGCallback& callback);
} // namespace ui
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | ui/snapshot/snapshot_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698