| 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..82cd11ef5f30216fb8c27dcd8553ad2defb5eb5f 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,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
|
| // suppress_next_char_events_.
|
| void SuppressNextCharEvents();
|
|
|
| + // Grab snapshot from renderer side. This is used when CopyFromBackingStore
|
| + // fails due to the backing store not being available or, in composited mode,
|
| + // when the accelerated surface is not available to the browser side.
|
| + 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 +611,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 +867,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
|
|
|