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 |