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 "base/memory/ref_counted.h" |
15 #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" | |
17 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
18 #include "content/public/browser/browser_ppapi_host.h" | 17 #include "content/public/browser/browser_ppapi_host.h" |
19 #include "content/public/common/process_type.h" | 18 #include "content/public/common/process_type.h" |
20 #include "ipc/ipc_channel_proxy.h" | 19 #include "ipc/ipc_channel_proxy.h" |
21 #include "ppapi/host/ppapi_host.h" | 20 #include "ppapi/host/ppapi_host.h" |
22 | 21 |
23 namespace content { | 22 namespace content { |
24 | 23 |
25 struct PepperRendererInstanceData; | 24 struct PepperRendererInstanceData; |
26 | 25 |
27 class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost { | 26 class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost { |
28 public: | 27 public: |
29 // The creator is responsible for calling set_plugin_process_handle as soon | 28 // The creator is responsible for calling set_plugin_process_handle as soon |
30 // as it is known (we start the process asynchronously so it won't be known | 29 // as it is known (we start the process asynchronously so it won't be known |
31 // when this object is created). | 30 // when this object is created). |
32 // |external_plugin| signfies that this is a proxy created for an embedder's | 31 // |external_plugin| signfies that this is a proxy created for an embedder's |
33 // plugin, i.e. using BrowserPpapiHost::CreateExternalPluginProcess. | 32 // plugin, i.e. using BrowserPpapiHost::CreateExternalPluginProcess. |
34 BrowserPpapiHostImpl( | 33 BrowserPpapiHostImpl( |
35 IPC::Sender* sender, | 34 IPC::Sender* sender, |
36 const ppapi::PpapiPermissions& permissions, | 35 const ppapi::PpapiPermissions& permissions, |
37 const std::string& plugin_name, | 36 const std::string& plugin_name, |
38 const base::FilePath& plugin_path, | 37 const base::FilePath& plugin_path, |
39 const base::FilePath& profile_data_directory, | 38 const base::FilePath& profile_data_directory, |
40 bool external_plugin, | 39 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); | |
44 virtual ~BrowserPpapiHostImpl(); | 40 virtual ~BrowserPpapiHostImpl(); |
45 | 41 |
46 // BrowserPpapiHost. | 42 // BrowserPpapiHost. |
47 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 43 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; |
48 virtual base::ProcessHandle GetPluginProcessHandle() const OVERRIDE; | 44 virtual base::ProcessHandle GetPluginProcessHandle() const OVERRIDE; |
49 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 45 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
50 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, | 46 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, |
51 int* render_process_id, | 47 int* render_process_id, |
52 int* render_view_id) const OVERRIDE; | 48 int* render_view_id) const OVERRIDE; |
53 virtual const std::string& GetPluginName() OVERRIDE; | 49 virtual const std::string& GetPluginName() OVERRIDE; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 InstanceMap instance_map_; | 106 InstanceMap instance_map_; |
111 | 107 |
112 scoped_refptr<HostMessageFilter> message_filter_; | 108 scoped_refptr<HostMessageFilter> message_filter_; |
113 | 109 |
114 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); | 110 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); |
115 }; | 111 }; |
116 | 112 |
117 } // namespace content | 113 } // namespace content |
118 | 114 |
119 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 115 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
OLD | NEW |