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_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/id_map.h" | 14 #include "base/id_map.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "content/public/renderer/render_view_observer.h" | 19 #include "content/public/renderer/render_view_observer.h" |
20 #include "content/renderer/mouse_lock_dispatcher.h" | 20 #include "content/renderer/mouse_lock_dispatcher.h" |
21 #include "content/renderer/pepper/pepper_parent_context_provider.h" | |
22 #include "content/renderer/render_view_pepper_helper.h" | 21 #include "content/renderer/render_view_pepper_helper.h" |
23 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 22 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" |
24 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 23 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
25 #include "ui/base/ime/text_input_type.h" | 24 #include "ui/base/ime/text_input_type.h" |
26 #include "webkit/plugins/ppapi/plugin_delegate.h" | 25 #include "webkit/plugins/ppapi/plugin_delegate.h" |
27 | 26 |
28 namespace base { | 27 namespace base { |
29 class FilePath; | 28 class FilePath; |
30 } | 29 } |
31 | 30 |
(...skipping 24 matching lines...) Expand all Loading... |
56 class ContextProviderCommandBuffer; | 55 class ContextProviderCommandBuffer; |
57 class GamepadSharedMemoryReader; | 56 class GamepadSharedMemoryReader; |
58 class PepperBrokerImpl; | 57 class PepperBrokerImpl; |
59 class PepperDeviceEnumerationEventHandler; | 58 class PepperDeviceEnumerationEventHandler; |
60 class RenderViewImpl; | 59 class RenderViewImpl; |
61 | 60 |
62 class PepperPluginDelegateImpl | 61 class PepperPluginDelegateImpl |
63 : public webkit::ppapi::PluginDelegate, | 62 : public webkit::ppapi::PluginDelegate, |
64 public RenderViewPepperHelper, | 63 public RenderViewPepperHelper, |
65 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 64 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
66 public PepperParentContextProvider, | |
67 public RenderViewObserver { | 65 public RenderViewObserver { |
68 public: | 66 public: |
69 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 67 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
70 virtual ~PepperPluginDelegateImpl(); | 68 virtual ~PepperPluginDelegateImpl(); |
71 | 69 |
72 RenderViewImpl* render_view() { return render_view_; } | 70 RenderViewImpl* render_view() { return render_view_; } |
73 | 71 |
74 // Sets up the renderer host and out-of-process proxy for an external plugin | 72 // Sets up the renderer host and out-of-process proxy for an external plugin |
75 // module. Returns the renderer host, or NULL if it couldn't be created. | 73 // module. Returns the renderer host, or NULL if it couldn't be created. |
76 RendererPpapiHost* CreateExternalPluginModule( | 74 RendererPpapiHost* CreateExternalPluginModule( |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 virtual PlatformAudioInput* CreateAudioInput( | 177 virtual PlatformAudioInput* CreateAudioInput( |
180 const std::string& device_id, | 178 const std::string& device_id, |
181 uint32_t sample_rate, | 179 uint32_t sample_rate, |
182 uint32_t sample_count, | 180 uint32_t sample_count, |
183 PlatformAudioInputClient* client) OVERRIDE; | 181 PlatformAudioInputClient* client) OVERRIDE; |
184 virtual PlatformImage2D* CreateImage2D(int width, int height) OVERRIDE; | 182 virtual PlatformImage2D* CreateImage2D(int width, int height) OVERRIDE; |
185 virtual PlatformGraphics2D* GetGraphics2D( | 183 virtual PlatformGraphics2D* GetGraphics2D( |
186 webkit::ppapi::PluginInstance* instance, | 184 webkit::ppapi::PluginInstance* instance, |
187 PP_Resource resource) OVERRIDE; | 185 PP_Resource resource) OVERRIDE; |
188 virtual PlatformContext3D* CreateContext3D() OVERRIDE; | 186 virtual PlatformContext3D* CreateContext3D() OVERRIDE; |
189 virtual void ReparentContext(PlatformContext3D*) OVERRIDE; | |
190 virtual PlatformVideoCapture* CreateVideoCapture( | 187 virtual PlatformVideoCapture* CreateVideoCapture( |
191 const std::string& device_id, | 188 const std::string& device_id, |
192 PlatformVideoCaptureEventHandler* handler) OVERRIDE; | 189 PlatformVideoCaptureEventHandler* handler) OVERRIDE; |
193 virtual PlatformVideoDecoder* CreateVideoDecoder( | 190 virtual PlatformVideoDecoder* CreateVideoDecoder( |
194 media::VideoDecodeAccelerator::Client* client, | 191 media::VideoDecodeAccelerator::Client* client, |
195 int32 command_buffer_route_id) OVERRIDE; | 192 int32 command_buffer_route_id) OVERRIDE; |
196 virtual Broker* ConnectToBroker( | 193 virtual Broker* ConnectToBroker( |
197 webkit::ppapi::PPB_Broker_Impl* client) OVERRIDE; | 194 webkit::ppapi::PPB_Broker_Impl* client) OVERRIDE; |
198 virtual void NumberOfFindResultsChanged(int identifier, | 195 virtual void NumberOfFindResultsChanged(int identifier, |
199 int total, | 196 int total, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // and perform other common initialization. | 372 // and perform other common initialization. |
376 RendererPpapiHost* CreateOutOfProcessModule( | 373 RendererPpapiHost* CreateOutOfProcessModule( |
377 webkit::ppapi::PluginModule* module, | 374 webkit::ppapi::PluginModule* module, |
378 const base::FilePath& path, | 375 const base::FilePath& path, |
379 ppapi::PpapiPermissions permissions, | 376 ppapi::PpapiPermissions permissions, |
380 const IPC::ChannelHandle& channel_handle, | 377 const IPC::ChannelHandle& channel_handle, |
381 base::ProcessId plugin_pid, | 378 base::ProcessId plugin_pid, |
382 int plugin_child_id, | 379 int plugin_child_id, |
383 bool is_external); | 380 bool is_external); |
384 | 381 |
385 // Implementation of PepperParentContextProvider. | |
386 virtual WebGraphicsContext3DCommandBufferImpl* | |
387 GetParentContextForPlatformContext3D() OVERRIDE; | |
388 | |
389 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter( | 382 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter( |
390 webkit::ppapi::PluginInstance* instance); | 383 webkit::ppapi::PluginInstance* instance); |
391 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance); | 384 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance); |
392 | 385 |
393 MouseLockDispatcher* GetMouseLockDispatcher( | 386 MouseLockDispatcher* GetMouseLockDispatcher( |
394 webkit::ppapi::PluginInstance* instance); | 387 webkit::ppapi::PluginInstance* instance); |
395 | 388 |
396 // Pointer to the RenderView that owns us. | 389 // Pointer to the RenderView that owns us. |
397 RenderViewImpl* render_view_; | 390 RenderViewImpl* render_view_; |
398 | 391 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 device_enumeration_event_handler_; | 426 device_enumeration_event_handler_; |
434 | 427 |
435 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; | 428 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; |
436 | 429 |
437 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 430 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
438 }; | 431 }; |
439 | 432 |
440 } // namespace content | 433 } // namespace content |
441 | 434 |
442 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 435 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |