| 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" |
| 11 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" | 11 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
| 12 #include "ppapi/host/ppapi_host.h" | 12 #include "ppapi/host/ppapi_host.h" |
| 13 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 13 #include "webkit/plugins/ppapi/plugin_module.h" | 14 #include "webkit/plugins/ppapi/plugin_module.h" |
| 14 | 15 |
| 15 namespace IPC { | 16 namespace IPC { |
| 16 class Sender; | 17 class Sender; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace ppapi { | 20 namespace ppapi { |
| 20 | 21 |
| 21 namespace proxy { | 22 namespace proxy { |
| 22 class HostDispatcher; | 23 class HostDispatcher; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // Creates the in-process resource creation API wrapper for the given | 76 // Creates the in-process resource creation API wrapper for the given |
| 76 // plugin instance. This object will reference the host impl, so the | 77 // plugin instance. This object will reference the host impl, so the |
| 77 // host impl should outlive the returned pointer. Since the resource | 78 // host impl should outlive the returned pointer. Since the resource |
| 78 // creation object is associated with the instance, this will generally | 79 // creation object is associated with the instance, this will generally |
| 79 // happen automatically. | 80 // happen automatically. |
| 80 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> | 81 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> |
| 81 CreateInProcessResourceCreationAPI( | 82 CreateInProcessResourceCreationAPI( |
| 82 webkit::ppapi::PluginInstance* instance); | 83 webkit::ppapi::PluginInstance* instance); |
| 83 | 84 |
| 84 // RendererPpapiHost. | 85 // RendererPpapiHost. |
| 85 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 86 virtual ppapi::host::PpapiHost* GetPpapiHost() const OVERRIDE; |
| 86 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 87 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
| 88 virtual webkit::ppapi::PluginDelegate::PlatformGraphics2D* |
| 89 GetPlatformGraphics2D(PP_Resource resource) const OVERRIDE; |
| 87 virtual RenderView* GetRenderViewForInstance( | 90 virtual RenderView* GetRenderViewForInstance( |
| 88 PP_Instance instance) const OVERRIDE; | 91 PP_Instance instance) const OVERRIDE; |
| 89 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; | 92 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; |
| 90 | 93 |
| 91 private: | 94 private: |
| 92 RendererPpapiHostImpl(webkit::ppapi::PluginModule* module, | 95 RendererPpapiHostImpl(webkit::ppapi::PluginModule* module, |
| 93 ppapi::proxy::HostDispatcher* dispatcher, | 96 ppapi::proxy::HostDispatcher* dispatcher, |
| 94 const ppapi::PpapiPermissions& permissions); | 97 const ppapi::PpapiPermissions& permissions); |
| 95 RendererPpapiHostImpl(webkit::ppapi::PluginModule* module, | 98 RendererPpapiHostImpl(webkit::ppapi::PluginModule* module, |
| 96 const ppapi::PpapiPermissions& permissions); | 99 const ppapi::PpapiPermissions& permissions); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 110 | 113 |
| 111 // Null when running out-of-process. | 114 // Null when running out-of-process. |
| 112 scoped_ptr<PepperInProcessRouter> in_process_router_; | 115 scoped_ptr<PepperInProcessRouter> in_process_router_; |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); | 117 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace content | 120 } // namespace content |
| 118 | 121 |
| 119 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 122 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
| OLD | NEW |