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_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ |
6 #define CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ | 6 #define CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
9 #include "ppapi/host/host_factory.h" | 11 #include "ppapi/host/host_factory.h" |
10 | 12 |
11 namespace ppapi { | 13 namespace ppapi { |
12 class PpapiPermissions; | 14 class PpapiPermissions; |
13 } | 15 } |
14 | 16 |
15 namespace content { | 17 namespace content { |
16 | 18 |
17 class BrowserPpapiHostImpl; | 19 class BrowserPpapiHostImpl; |
18 | 20 |
19 class ContentBrowserPepperHostFactory : public ppapi::host::HostFactory { | 21 class ContentBrowserPepperHostFactory : public ppapi::host::HostFactory { |
20 public: | 22 public: |
21 // Non-owning pointer to the filter must outlive this class. | 23 // Non-owning pointer to the filter must outlive this class. |
22 explicit ContentBrowserPepperHostFactory(BrowserPpapiHostImpl* host); | 24 ContentBrowserPepperHostFactory( |
| 25 BrowserPpapiHostImpl* host, |
| 26 // TODO (ygorshenin@): remove this once TCP sockets are |
| 27 // converted to the new design. |
| 28 const scoped_refptr<PepperMessageFilter>& pepper_message_filter); |
23 virtual ~ContentBrowserPepperHostFactory(); | 29 virtual ~ContentBrowserPepperHostFactory(); |
24 | 30 |
25 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( | 31 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( |
26 ppapi::host::PpapiHost* host, | 32 ppapi::host::PpapiHost* host, |
27 const ppapi::proxy::ResourceMessageCallParams& params, | 33 const ppapi::proxy::ResourceMessageCallParams& params, |
28 PP_Instance instance, | 34 PP_Instance instance, |
29 const IPC::Message& message) OVERRIDE; | 35 const IPC::Message& message) OVERRIDE; |
30 | 36 |
31 private: | 37 private: |
32 const ppapi::PpapiPermissions& GetPermissions() const; | 38 const ppapi::PpapiPermissions& GetPermissions() const; |
33 | 39 |
34 // Non-owning pointer. | 40 // Non-owning pointer. |
35 BrowserPpapiHostImpl* host_; | 41 BrowserPpapiHostImpl* host_; |
36 | 42 |
| 43 scoped_refptr<PepperMessageFilter> pepper_message_filter_; |
| 44 |
37 DISALLOW_COPY_AND_ASSIGN(ContentBrowserPepperHostFactory); | 45 DISALLOW_COPY_AND_ASSIGN(ContentBrowserPepperHostFactory); |
38 }; | 46 }; |
39 | 47 |
40 } // namespace content | 48 } // namespace content |
41 | 49 |
42 #endif // CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ | 50 #endif // CONTENT_BROWSER_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_ |
OLD | NEW |