| Index: content/public/renderer/renderer_ppapi_host.h
|
| diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h
|
| index e223094839e2c934c401ee764e50fd9738a207ea..8f8dfb3690d456a7815394c23ac3393f36008546 100644
|
| --- a/content/public/renderer/renderer_ppapi_host.h
|
| +++ b/content/public/renderer/renderer_ppapi_host.h
|
| @@ -6,7 +6,9 @@
|
| #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
|
|
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/platform_file.h"
|
| #include "content/common/content_export.h"
|
| +#include "ipc/ipc_platform_file.h"
|
| #include "ppapi/c/pp_instance.h"
|
|
|
| class FilePath;
|
| @@ -22,6 +24,12 @@ class PpapiHost;
|
| }
|
| }
|
|
|
| +namespace webkit {
|
| +namespace ppapi {
|
| +class PluginInstance;
|
| +}
|
| +}
|
| +
|
| namespace WebKit {
|
| class WebPluginContainer;
|
| }
|
| @@ -63,6 +71,11 @@ class RendererPpapiHost {
|
| // plugin associated with this host.
|
| virtual bool IsValidInstance(PP_Instance instance) const = 0;
|
|
|
| + // Returns the PluginInstance for the given PP_Instance, or NULL if the
|
| + // PP_Instance is invalid.
|
| + virtual webkit::ppapi::PluginInstance* GetPluginInstance(
|
| + PP_Instance instance) const = 0;
|
| +
|
| // Returns the RenderView for the given plugin instance, or NULL if the
|
| // instance is invalid.
|
| virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0;
|
| @@ -79,6 +92,16 @@ class RendererPpapiHost {
|
| // if there is no current user gesture.
|
| virtual bool HasUserGesture(PP_Instance instance) const = 0;
|
|
|
| + // Shares a file handle (HANDLE / file descriptor) with the remote side. It
|
| + // returns a handle that should be sent in exactly one IPC message. Upon
|
| + // receipt, the remote side then owns that handle. Note: if sending the
|
| + // message fails, the returned handle is properly closed by the IPC system. If
|
| + // |should_close_source| is set to true, the original handle is closed by this
|
| + // operation and should not be used again.
|
| + virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
|
| + base::PlatformFile handle,
|
| + bool should_close_source) = 0;
|
| +
|
| protected:
|
| virtual ~RendererPpapiHost() {}
|
| };
|
|
|