| 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 "ppapi/host/host_factory.h" | 9 #include "ppapi/host/host_factory.h" |
| 10 #include "ppapi/shared_impl/ppapi_permissions.h" | 10 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 11 | 11 |
| 12 class RenderViewImpl; | 12 class RenderViewImpl; |
| 13 | 13 |
| 14 namespace ppapi { |
| 15 class PpapiPermissions; |
| 16 } |
| 17 |
| 14 namespace content { | 18 namespace content { |
| 15 | 19 |
| 20 class RendererPpapiHostImpl; |
| 21 |
| 16 class PepperInstanceStateAccessor; | 22 class PepperInstanceStateAccessor; |
| 17 | 23 |
| 18 class ContentRendererPepperHostFactory : public ppapi::host::HostFactory { | 24 class ContentRendererPepperHostFactory : public ppapi::host::HostFactory { |
| 19 public: | 25 public: |
| 20 explicit ContentRendererPepperHostFactory( | 26 explicit ContentRendererPepperHostFactory( |
| 21 RenderViewImpl* render_view, | 27 RendererPpapiHostImpl* host); |
| 22 const ppapi::PpapiPermissions& permissions, | |
| 23 PepperInstanceStateAccessor* state); | |
| 24 virtual ~ContentRendererPepperHostFactory(); | 28 virtual ~ContentRendererPepperHostFactory(); |
| 25 | 29 |
| 26 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( | 30 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( |
| 27 ppapi::host::PpapiHost* host, | 31 ppapi::host::PpapiHost* host, |
| 28 const ppapi::proxy::ResourceMessageCallParams& params, | 32 const ppapi::proxy::ResourceMessageCallParams& params, |
| 29 PP_Instance instance, | 33 PP_Instance instance, |
| 30 const IPC::Message& message) OVERRIDE; | 34 const IPC::Message& message) OVERRIDE; |
| 31 | 35 |
| 32 private: | 36 private: |
| 33 RenderViewImpl* render_view_; // Non-owning. | 37 const ppapi::PpapiPermissions& GetPermissions() const; |
| 34 ppapi::PpapiPermissions permissions_; | 38 |
| 35 PepperInstanceStateAccessor* instance_state_; // Non-owning. | 39 // Non-owning pointer. |
| 40 RendererPpapiHostImpl* host_; |
| 36 | 41 |
| 37 DISALLOW_COPY_AND_ASSIGN(ContentRendererPepperHostFactory); | 42 DISALLOW_COPY_AND_ASSIGN(ContentRendererPepperHostFactory); |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 } // namespace content | 45 } // namespace content |
| 41 | 46 |
| 42 #endif // CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ | 47 #endif // CONTENT_RENDERER_PEPPER_CONTENT_RENDERER_PEPPER_HOST_FACTORY_H_ |
| OLD | NEW |