| 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 bee35a695fe32bbc4ff46a72d183675d7d9c5e5a..c721f969a28e9167bd899f6459109bb2252a5c45 100644
|
| --- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| +++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
|
| @@ -17,6 +17,8 @@
|
|
|
| namespace content {
|
|
|
| +struct PepperRendererInstanceData;
|
| +
|
| class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| public:
|
| // The creator is responsible for calling set_plugin_process_handle as soon
|
| @@ -33,18 +35,19 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| virtual bool GetRenderViewIDsForInstance(PP_Instance instance,
|
| int* render_process_id,
|
| int* render_view_id) const 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_;
|
| @@ -53,12 +56,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.
|
| @@ -80,9 +77,10 @@ class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
|
| ppapi::host::PpapiHost ppapi_host_;
|
| base::ProcessHandle plugin_process_handle_;
|
|
|
| - // 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_;
|
|
|
|
|