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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // creation object is associated with the instance, this will generally | 69 // creation object is associated with the instance, this will generally |
70 // happen automatically. | 70 // happen automatically. |
71 scoped_ptr<ppapi::thunk::ResourceCreationAPI> | 71 scoped_ptr<ppapi::thunk::ResourceCreationAPI> |
72 CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance); | 72 CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance); |
73 | 73 |
74 PepperPluginInstanceImpl* GetPluginInstanceImpl(PP_Instance instance) const; | 74 PepperPluginInstanceImpl* GetPluginInstanceImpl(PP_Instance instance) const; |
75 | 75 |
76 // RendererPpapiHost implementation. | 76 // RendererPpapiHost implementation. |
77 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 77 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; |
78 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 78 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
79 virtual PepperPluginInstance* GetPluginInstance( | 79 virtual PepperPluginInstance* GetPluginInstance(PP_Instance instance) const |
80 PP_Instance instance) const OVERRIDE; | 80 OVERRIDE; |
81 virtual RenderFrame* GetRenderFrameForInstance( | 81 virtual RenderFrame* GetRenderFrameForInstance(PP_Instance instance) const |
82 PP_Instance instance) const OVERRIDE; | 82 OVERRIDE; |
83 virtual RenderView* GetRenderViewForInstance( | 83 virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const |
84 PP_Instance instance) const OVERRIDE; | 84 OVERRIDE; |
85 virtual blink::WebPluginContainer* GetContainerForInstance( | 85 virtual blink::WebPluginContainer* GetContainerForInstance( |
86 PP_Instance instance) const OVERRIDE; | 86 PP_Instance instance) const OVERRIDE; |
87 virtual base::ProcessId GetPluginPID() const OVERRIDE; | 87 virtual base::ProcessId GetPluginPID() const OVERRIDE; |
88 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; | 88 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; |
89 virtual int GetRoutingIDForWidget(PP_Instance instance) const OVERRIDE; | 89 virtual int GetRoutingIDForWidget(PP_Instance instance) const OVERRIDE; |
90 virtual gfx::Point PluginPointToRenderFrame( | 90 virtual gfx::Point PluginPointToRenderFrame(PP_Instance instance, |
91 PP_Instance instance, | 91 const gfx::Point& pt) const |
92 const gfx::Point& pt) const OVERRIDE; | 92 OVERRIDE; |
93 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 93 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
94 base::PlatformFile handle, | 94 base::PlatformFile handle, |
95 bool should_close_source) OVERRIDE; | 95 bool should_close_source) OVERRIDE; |
96 virtual bool IsRunningInProcess() const OVERRIDE; | 96 virtual bool IsRunningInProcess() const OVERRIDE; |
97 virtual void CreateBrowserResourceHosts( | 97 virtual void CreateBrowserResourceHosts( |
98 PP_Instance instance, | 98 PP_Instance instance, |
99 const std::vector<IPC::Message>& nested_msgs, | 99 const std::vector<IPC::Message>& nested_msgs, |
100 const base::Callback<void( | 100 const base::Callback<void(const std::vector<int>&)>& callback) const |
101 const std::vector<int>&)>& callback) const OVERRIDE; | 101 OVERRIDE; |
102 virtual GURL GetDocumentURL(PP_Instance instance) const OVERRIDE; | 102 virtual GURL GetDocumentURL(PP_Instance instance) const OVERRIDE; |
103 | 103 |
104 private: | 104 private: |
105 RendererPpapiHostImpl(PluginModule* module, | 105 RendererPpapiHostImpl(PluginModule* module, |
106 ppapi::proxy::HostDispatcher* dispatcher, | 106 ppapi::proxy::HostDispatcher* dispatcher, |
107 const ppapi::PpapiPermissions& permissions); | 107 const ppapi::PpapiPermissions& permissions); |
108 RendererPpapiHostImpl(PluginModule* module, | 108 RendererPpapiHostImpl(PluginModule* module, |
109 const ppapi::PpapiPermissions& permissions); | 109 const ppapi::PpapiPermissions& permissions); |
110 | 110 |
111 // Retrieves the plugin instance object associated with the given PP_Instance | 111 // Retrieves the plugin instance object associated with the given PP_Instance |
(...skipping 17 matching lines...) Expand all Loading... |
129 | 129 |
130 // Whether the plugin is running in process. | 130 // Whether the plugin is running in process. |
131 bool is_running_in_process_; | 131 bool is_running_in_process_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); | 133 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace content | 136 } // namespace content |
137 | 137 |
138 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 138 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
OLD | NEW |