Index: content/renderer/render_view_impl.h |
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h |
index bd61b92bb6c5ec2c0e897244368c10488b2bc6fa..5e3affa8112bf87737fa90f185e6667d5242bd93 100644 |
--- a/content/renderer/render_view_impl.h |
+++ b/content/renderer/render_view_impl.h |
@@ -379,6 +379,13 @@ class CONTENT_EXPORT RenderViewImpl |
// supported PPAPI plug-ins. |
bool HasIMETextFocus(); |
+ // Callback for use with GetWindowSnapshot. |
+ typedef base::Callback<void( |
+ const gfx::Size&, const std::vector<unsigned char>&)> |
+ WindowSnapshotCallback; |
+ |
+ void GetWindowSnapshot(const WindowSnapshotCallback& callback); |
+ |
// IPC::Listener implementation ---------------------------------------------- |
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
@@ -1031,6 +1038,9 @@ class CONTENT_EXPORT RenderViewImpl |
const gfx::Rect& view_frame); |
#endif |
+ void OnWindowSnapshotCompleted(const int snapshot_id, |
+ const gfx::Size& size, const std::vector<unsigned char>& png); |
+ |
// Adding a new message handler? Please add it in alphabetical order above |
// and put it in the same position in the .cc file. |
@@ -1499,6 +1509,12 @@ class CONTENT_EXPORT RenderViewImpl |
// Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
+ // State associated with the GetWindowSnapshot function. |
+ int next_snapshot_id_; |
+ typedef std::map<int, WindowSnapshotCallback> |
+ PendingSnapshotMap; |
+ PendingSnapshotMap pending_snapshots_; |
+ |
// Plugins ------------------------------------------------------------------- |
// All the currently active plugin delegates for this RenderView; kept so |