| 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_RENDERER_PPAPI_HOST_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/renderer_ppapi_host.h" | 10 #include "content/public/renderer/renderer_ppapi_host.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace thunk { | 24 namespace thunk { |
| 25 class ResourceCreationAPI; | 25 class ResourceCreationAPI; |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace ppapi | 28 } // namespace ppapi |
| 29 | 29 |
| 30 namespace content { | 30 namespace content { |
| 31 | 31 |
| 32 class PepperBrowserConnection; | |
| 33 class PepperInProcessRouter; | 32 class PepperInProcessRouter; |
| 34 class PepperPluginInstanceImpl; | 33 class PepperPluginInstanceImpl; |
| 35 class PluginModule; | 34 class PluginModule; |
| 36 | 35 |
| 37 // This class is attached to a PluginModule which manages our lifetime. | 36 // This class is attached to a PluginModule which manages our lifetime. |
| 38 class RendererPpapiHostImpl : public RendererPpapiHost { | 37 class RendererPpapiHostImpl : public RendererPpapiHost { |
| 39 public: | 38 public: |
| 40 virtual ~RendererPpapiHostImpl(); | 39 virtual ~RendererPpapiHostImpl(); |
| 41 | 40 |
| 42 // Factory functions to create in process or out-of-process host impls. The | 41 // Factory functions to create in process or out-of-process host impls. The |
| (...skipping 22 matching lines...) Expand all Loading... |
| 65 } | 64 } |
| 66 | 65 |
| 67 // Creates the in-process resource creation API wrapper for the given | 66 // Creates the in-process resource creation API wrapper for the given |
| 68 // plugin instance. This object will reference the host impl, so the | 67 // plugin instance. This object will reference the host impl, so the |
| 69 // host impl should outlive the returned pointer. Since the resource | 68 // host impl should outlive the returned pointer. Since the resource |
| 70 // creation object is associated with the instance, this will generally | 69 // creation object is associated with the instance, this will generally |
| 71 // happen automatically. | 70 // happen automatically. |
| 72 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> | 71 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> |
| 73 CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance); | 72 CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance); |
| 74 | 73 |
| 75 PepperBrowserConnection* GetBrowserConnection(PP_Instance instance) const; | |
| 76 | |
| 77 PepperPluginInstanceImpl* GetPluginInstanceImpl(PP_Instance instance) const; | 74 PepperPluginInstanceImpl* GetPluginInstanceImpl(PP_Instance instance) const; |
| 78 | 75 |
| 79 // RendererPpapiHost implementation. | 76 // RendererPpapiHost implementation. |
| 80 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 77 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; |
| 81 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 78 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
| 82 virtual PepperPluginInstance* GetPluginInstance( | 79 virtual PepperPluginInstance* GetPluginInstance( |
| 83 PP_Instance instance) const OVERRIDE; | 80 PP_Instance instance) const OVERRIDE; |
| 84 virtual RenderView* GetRenderViewForInstance( | 81 virtual RenderView* GetRenderViewForInstance( |
| 85 PP_Instance instance) const OVERRIDE; | 82 PP_Instance instance) const OVERRIDE; |
| 86 virtual WebKit::WebPluginContainer* GetContainerForInstance( | 83 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 125 |
| 129 // Whether the plugin is running in process. | 126 // Whether the plugin is running in process. |
| 130 bool is_running_in_process_; | 127 bool is_running_in_process_; |
| 131 | 128 |
| 132 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); | 129 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); |
| 133 }; | 130 }; |
| 134 | 131 |
| 135 } // namespace content | 132 } // namespace content |
| 136 | 133 |
| 137 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 134 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
| OLD | NEW |