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

Unified Diff: content/renderer/render_view_impl.h

Issue 11399002: Implemented GetWindowSnapshot on RenderViewImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added stub methods for iOS Created 8 years 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/content_browser.gypi ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/content_browser.gypi ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698