| Index: content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| index 888bb7c008eb1afb58d81dc9580a1724c2ea016a..ce3560ef257ffbc212f96a54818b208240a27969 100644
|
| --- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| +++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| @@ -19,6 +19,8 @@
|
|
|
| namespace content {
|
|
|
| +struct PepperRendererInstanceData;
|
| +
|
| class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| public:
|
| // The creator is responsible for calling set_plugin_process_handle as soon
|
| @@ -39,18 +41,19 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| int* render_view_id) const OVERRIDE;
|
| virtual const std::string& GetPluginName() OVERRIDE;
|
| virtual const FilePath& GetProfileDataDirectory() OVERRIDE;
|
| + virtual GURL GetDocumentURLForInstance(PP_Instance instance) OVERRIDE;
|
| + virtual GURL GetPluginURLForInstance(PP_Instance instance) OVERRIDE;
|
|
|
| void set_plugin_process_handle(base::ProcessHandle handle) {
|
| plugin_process_handle_ = handle;
|
| }
|
|
|
| // These two functions are notifications that an instance has been created
|
| - // or destroyed. They allow us to maintain a mapping of PP_Instance to view
|
| - // IDs in the browser process.
|
| - void AddInstanceForView(PP_Instance instance,
|
| - int render_process_id,
|
| - int render_view_id);
|
| - void DeleteInstanceForView(PP_Instance instance);
|
| + // or destroyed. They allow us to maintain a mapping of PP_Instance to data
|
| + // associated with the instance including view IDs in the browser process.
|
| + void AddInstance(PP_Instance instance,
|
| + const PepperRendererInstanceData& instance_data);
|
| + void DeleteInstance(PP_Instance instance);
|
|
|
| scoped_refptr<IPC::ChannelProxy::MessageFilter> message_filter() {
|
| return message_filter_;
|
| @@ -59,12 +62,6 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| private:
|
| friend class BrowserPpapiHostTest;
|
|
|
| - struct RenderViewIDs {
|
| - int process_id;
|
| - int view_id;
|
| - };
|
| - typedef std::map<PP_Instance, RenderViewIDs> InstanceToViewMap;
|
| -
|
| // Implementing MessageFilter on BrowserPpapiHostImpl makes it ref-counted,
|
| // preventing us from returning these to embedders without holding a
|
| // reference. To avoid that, define a message filter object.
|
| @@ -88,9 +85,10 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| std::string plugin_name_;
|
| FilePath profile_data_directory_;
|
|
|
| - // Tracks all PP_Instances in this plugin and maps them to
|
| - // RenderProcess/RenderView IDs.
|
| - InstanceToViewMap instance_to_view_;
|
| + // Tracks all PP_Instances in this plugin and associated renderer-related
|
| + // data.
|
| + typedef std::map<PP_Instance, PepperRendererInstanceData> InstanceMap;
|
| + InstanceMap instance_map_;
|
|
|
| scoped_refptr<HostMessageFilter> message_filter_;
|
|
|
|
|