| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/memory/ref_counted.h" |
| 14 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" | 15 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" |
| 16 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| 15 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 16 #include "content/public/browser/browser_ppapi_host.h" | 18 #include "content/public/browser/browser_ppapi_host.h" |
| 17 #include "content/public/common/process_type.h" | 19 #include "content/public/common/process_type.h" |
| 18 #include "ipc/ipc_channel_proxy.h" | 20 #include "ipc/ipc_channel_proxy.h" |
| 19 #include "ppapi/host/ppapi_host.h" | 21 #include "ppapi/host/ppapi_host.h" |
| 20 | 22 |
| 21 namespace content { | 23 namespace content { |
| 22 | 24 |
| 23 struct PepperRendererInstanceData; | 25 struct PepperRendererInstanceData; |
| 24 | 26 |
| 25 class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost { | 27 class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost { |
| 26 public: | 28 public: |
| 27 // The creator is responsible for calling set_plugin_process_handle as soon | 29 // The creator is responsible for calling set_plugin_process_handle as soon |
| 28 // as it is known (we start the process asynchronously so it won't be known | 30 // as it is known (we start the process asynchronously so it won't be known |
| 29 // when this object is created). | 31 // when this object is created). |
| 30 // |external_plugin| signfies that this is a proxy created for an embedder's | 32 // |external_plugin| signfies that this is a proxy created for an embedder's |
| 31 // plugin, i.e. using BrowserPpapiHost::CreateExternalPluginProcess. | 33 // plugin, i.e. using BrowserPpapiHost::CreateExternalPluginProcess. |
| 32 BrowserPpapiHostImpl(IPC::Sender* sender, | 34 BrowserPpapiHostImpl( |
| 33 const ppapi::PpapiPermissions& permissions, | 35 IPC::Sender* sender, |
| 34 const std::string& plugin_name, | 36 const ppapi::PpapiPermissions& permissions, |
| 35 const base::FilePath& plugin_path, | 37 const std::string& plugin_name, |
| 36 const base::FilePath& profile_data_directory, | 38 const base::FilePath& plugin_path, |
| 37 bool external_plugin); | 39 const base::FilePath& profile_data_directory, |
| 40 bool external_plugin, |
| 41 // TODO (ygorshenin@): remove this once TCP sockets are |
| 42 // converted to the new design. |
| 43 const scoped_refptr<PepperMessageFilter>& pepper_message_filter); |
| 38 virtual ~BrowserPpapiHostImpl(); | 44 virtual ~BrowserPpapiHostImpl(); |
| 39 | 45 |
| 40 // BrowserPpapiHost. | 46 // BrowserPpapiHost. |
| 41 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 47 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; |
| 42 virtual base::ProcessHandle GetPluginProcessHandle() const OVERRIDE; | 48 virtual base::ProcessHandle GetPluginProcessHandle() const OVERRIDE; |
| 43 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 49 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
| 44 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, | 50 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, |
| 45 int* render_process_id, | 51 int* render_process_id, |
| 46 int* render_view_id) const OVERRIDE; | 52 int* render_view_id) const OVERRIDE; |
| 47 virtual const std::string& GetPluginName() OVERRIDE; | 53 virtual const std::string& GetPluginName() OVERRIDE; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 InstanceMap instance_map_; | 110 InstanceMap instance_map_; |
| 105 | 111 |
| 106 scoped_refptr<HostMessageFilter> message_filter_; | 112 scoped_refptr<HostMessageFilter> message_filter_; |
| 107 | 113 |
| 108 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); | 114 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); |
| 109 }; | 115 }; |
| 110 | 116 |
| 111 } // namespace content | 117 } // namespace content |
| 112 | 118 |
| 113 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 119 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| OLD | NEW |