| Index: content/browser/gpu/gpu_process_host.h
|
| diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
|
| index ab74fed4bbcb520a120512477bd0f6dc0638e04c..812e7dbd7b994740ebe915886d9b887d98d341cd 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -18,8 +18,10 @@
|
| #include "content/public/browser/browser_child_process_host_delegate.h"
|
| #include "content/public/browser/gpu_data_manager.h"
|
| #include "content/public/common/gpu_info.h"
|
| +#include "gpu/command_buffer/common/constants.h"
|
| #include "ipc/ipc_channel_proxy.h"
|
| #include "ipc/ipc_sender.h"
|
| +#include "googleurl/src/gurl.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| #include "ui/gfx/size.h"
|
|
|
| @@ -141,7 +143,11 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| void OnCommandBufferCreated(const int32 route_id);
|
| void OnDestroyCommandBuffer(int32 surface_id);
|
| void OnImageCreated(const gfx::Size size);
|
| -
|
| + void OnDidCreateOffscreenContext(const GURL& containing_document_url);
|
| + void OnDidLoseContext(bool offscreen,
|
| + gpu::error::ContextLostReason reason,
|
| + const GURL& containing_document_url);
|
| + void OnDidDestroyOffscreenContext(const GURL& containing_document_url);
|
| #if defined(OS_MACOSX)
|
| void OnAcceleratedSurfaceBuffersSwapped(
|
| const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
|
| @@ -226,6 +232,13 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
|
|
| scoped_ptr<BrowserChildProcessHostImpl> process_;
|
|
|
| + // Track the URLs of the pages which have live offscreen contexts,
|
| + // assumed to be associated with untrusted content such as WebGL.
|
| + // For best robustness, when any context lost notification is
|
| + // received, assume all of these URLs are guilty, and block
|
| + // automatic execution of 3D content from those domains.
|
| + std::multiset<GURL> urls_with_live_offscreen_contexts_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
|
| };
|
|
|
|
|