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_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ |
6 #define CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ | 6 #define CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ppapi/host/host_factory.h" | 10 #include "ppapi/host/host_factory.h" |
11 #include "ppapi/shared_impl/ppapi_permissions.h" | 11 #include "ppapi/shared_impl/ppapi_permissions.h" |
12 | 12 |
13 namespace ppapi { | 13 namespace ppapi { |
14 class PpapiPermissions; | 14 class PpapiPermissions; |
15 } | 15 } |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 class PepperInstanceStateAccessor; | |
19 class RendererPpapiHostImpl; | 18 class RendererPpapiHostImpl; |
20 class RenderViewImpl; | |
21 | 19 |
22 class ContentRendererPepperHostFactory : public ppapi::host::HostFactory { | 20 class ContentRendererPepperHostFactory : public ppapi::host::HostFactory { |
23 public: | 21 public: |
24 explicit ContentRendererPepperHostFactory(RendererPpapiHostImpl* host); | 22 explicit ContentRendererPepperHostFactory(RendererPpapiHostImpl* host); |
25 ~ContentRendererPepperHostFactory() override; | 23 ~ContentRendererPepperHostFactory() override; |
26 | 24 |
27 std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost( | 25 std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost( |
28 ppapi::host::PpapiHost* host, | 26 ppapi::host::PpapiHost* host, |
29 PP_Resource resource, | 27 PP_Resource resource, |
30 PP_Instance instance, | 28 PP_Instance instance, |
31 const IPC::Message& message) override; | 29 const IPC::Message& message) override; |
32 | 30 |
33 private: | 31 private: |
34 const ppapi::PpapiPermissions& GetPermissions() const; | 32 const ppapi::PpapiPermissions& GetPermissions() const; |
35 | 33 |
36 // Non-owning pointer. | 34 // Non-owning pointer. |
37 RendererPpapiHostImpl* host_; | 35 RendererPpapiHostImpl* host_; |
38 | 36 |
39 DISALLOW_COPY_AND_ASSIGN(ContentRendererPepperHostFactory); | 37 DISALLOW_COPY_AND_ASSIGN(ContentRendererPepperHostFactory); |
40 }; | 38 }; |
41 | 39 |
42 } // namespace content | 40 } // namespace content |
43 | 41 |
44 #endif // CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ | 42 #endif // CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ |
OLD | NEW |