| Index: content/browser/renderer_host/render_view_host_impl.h
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
| index 050edc030717b1358ad23ad23748bb78afd0d60d..b9e0569dcb9aeeb5b423aa9a4d9cb87229e1df21 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.h
|
| +++ b/content/browser/renderer_host/render_view_host_impl.h
|
| @@ -230,6 +230,11 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| const WebPreferences& prefs) OVERRIDE;
|
| virtual void GetAudioOutputControllers(
|
| const GetAudioOutputControllersCallback& callback) const OVERRIDE;
|
| + virtual void CopyFromBackingStore(
|
| + const gfx::Rect& src_rect,
|
| + const gfx::Size& accelerated_dst_size,
|
| + const base::Callback<void(bool, const SkBitmap&)>& callback,
|
| + const SkBitmap::Config& bitmap_config) OVERRIDE;
|
|
|
| #if defined(OS_ANDROID)
|
| virtual void ActivateNearestFindResult(int request_id,
|
| @@ -243,6 +248,11 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| virtual void SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) OVERRIDE;
|
| #endif
|
|
|
| + void CopyFromBackingStoreCallback(
|
| + const base::Callback<void(bool, const SkBitmap&)>& callback,
|
| + bool success,
|
| + const SkBitmap& bitmap);
|
| +
|
| void set_delegate(RenderViewHostDelegate* d) {
|
| CHECK(d); // http://crbug.com/82827
|
| delegate_ = d;
|
| @@ -720,11 +730,22 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| // TODO(nasko): Move to RenderFrameHost, as this is per-frame state.
|
| scoped_ptr<TimeoutMonitor> unload_event_monitor_timeout_;
|
|
|
| - // Called after receiving the SwapOutACK when the RVH is in state pending
|
| - // shutdown. Also called if the unload timer times out.
|
| + // Called after receiving the SwapOutACK and completing outstanding copy
|
| + // requests when the RVH is in state pending shutdown. Also called if the
|
| + // unload timer times out.
|
| // TODO(nasko): Move to RenderFrameHost, as this is per-frame state.
|
| base::Closure pending_shutdown_on_swap_out_;
|
|
|
| + // Set to true if pending_shutdown_on_swap_out_ is not invoked upon receiving
|
| + // the SwapOutACK because of outstanding copy requests. In this case
|
| + // pending_shutdown_on_swap_out_ gets called when the copy requests complete.
|
| + bool pending_shutdown_on_copy_requests_done_;
|
| +
|
| + // Stores the number of the outstanding copy requests (see
|
| + // CopyFromBackingStore()). If the host gets swapped out with outstanding copy
|
| + // requests, we delay its shutdown until the copy requests complete.
|
| + int copy_requests_;
|
| +
|
| base::WeakPtrFactory<RenderViewHostImpl> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
|
|
|