Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_impl.h |
| diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h |
| index 9485aa8828ef69db3d986761f7a237dbcc8dea42..834e776118f011d5893d60933c0a5fddb31c5be4 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.h |
| +++ b/content/browser/renderer_host/render_widget_host_impl.h |
| @@ -10,6 +10,7 @@ |
| #include <map> |
| #include <queue> |
| #include <string> |
| +#include <utility> |
| #include <vector> |
| #include "base/callback.h" |
| @@ -450,6 +451,13 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
| // suppress_next_char_events_. |
| void SuppressNextCharEvents(); |
| + // Grab snapshot from renderer side. This can be used when copying from |
| + // browser side might fail due to buggy drivers or other issues. |
|
Sam Kerner (Chrome)
2013/03/18 13:49:51
Unless something changed, this should note that co
justinlin
2013/03/18 18:10:01
I mentioned when the backing store is not availabl
|
| + void GetSnapshotFromRenderer( |
| + const gfx::Rect& src_subrect, |
| + const gfx::Size& dst_size, |
| + const base::Callback<void(bool, const SkBitmap&)>& callback); |
| + |
| protected: |
| virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; |
| @@ -602,6 +610,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
| void OnWindowlessPluginDummyWindowDestroyed( |
| gfx::NativeViewId dummy_activation_window); |
| #endif |
| + void OnSnapshot(bool success, const SkBitmap& bitmap); |
| // Called (either immediately or asynchronously) after we're done with our |
| // BackingStore and can send an ACK to the renderer so it can paint onto it |
| @@ -857,6 +866,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
| scoped_ptr<GestureEventFilter> gesture_event_filter_; |
| scoped_ptr<OverscrollController> overscroll_controller_; |
| + typedef std::pair<gfx::Size, base::Callback<void(bool, const SkBitmap&)> > |
| + PendingSnapshotInfo; |
| + std::queue<PendingSnapshotInfo> pending_snapshots_; |
| + |
| #if defined(OS_WIN) |
| std::list<HWND> dummy_windows_for_activation_; |
| #endif |