| 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_browser_connection.h" |
| 21 #include "content/renderer/render_view_pepper_helper.h" | 22 #include "content/renderer/render_view_pepper_helper.h" |
| 22 #include "ppapi/c/pp_file_info.h" | 23 #include "ppapi/c/pp_file_info.h" |
| 23 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 24 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" |
| 24 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
| 25 #include "ui/base/ime/text_input_type.h" | 26 #include "ui/base/ime/text_input_type.h" |
| 26 #include "webkit/plugins/ppapi/plugin_delegate.h" | 27 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| 29 class FilePath; | 30 class FilePath; |
| 30 } | 31 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 : public webkit::ppapi::PluginDelegate, | 64 : public webkit::ppapi::PluginDelegate, |
| 64 public RenderViewPepperHelper, | 65 public RenderViewPepperHelper, |
| 65 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 66 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
| 66 public RenderViewObserver { | 67 public RenderViewObserver { |
| 67 public: | 68 public: |
| 68 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 69 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
| 69 virtual ~PepperPluginDelegateImpl(); | 70 virtual ~PepperPluginDelegateImpl(); |
| 70 | 71 |
| 71 RenderViewImpl* render_view() { return render_view_; } | 72 RenderViewImpl* render_view() { return render_view_; } |
| 72 | 73 |
| 74 PepperBrowserConnection* pepper_browser_connection() { |
| 75 return &pepper_browser_connection_; |
| 76 } |
| 77 |
| 73 // Sets up the renderer host and out-of-process proxy for an external plugin | 78 // Sets up the renderer host and out-of-process proxy for an external plugin |
| 74 // module. Returns the renderer host, or NULL if it couldn't be created. | 79 // module. Returns the renderer host, or NULL if it couldn't be created. |
| 75 RendererPpapiHost* CreateExternalPluginModule( | 80 RendererPpapiHost* CreateExternalPluginModule( |
| 76 scoped_refptr<webkit::ppapi::PluginModule> module, | 81 scoped_refptr<webkit::ppapi::PluginModule> module, |
| 77 const base::FilePath& path, | 82 const base::FilePath& path, |
| 78 ppapi::PpapiPermissions permissions, | 83 ppapi::PpapiPermissions permissions, |
| 79 const IPC::ChannelHandle& channel_handle, | 84 const IPC::ChannelHandle& channel_handle, |
| 80 base::ProcessId plugin_pid, | 85 base::ProcessId plugin_pid, |
| 81 int plugin_child_id); | 86 int plugin_child_id); |
| 82 | 87 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 409 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 405 base::PlatformFile handle, | 410 base::PlatformFile handle, |
| 406 base::ProcessId target_process_id, | 411 base::ProcessId target_process_id, |
| 407 bool should_close_source) const OVERRIDE; | 412 bool should_close_source) const OVERRIDE; |
| 408 | 413 |
| 409 virtual bool IsRunningInProcess(PP_Instance instance) const OVERRIDE; | 414 virtual bool IsRunningInProcess(PP_Instance instance) const OVERRIDE; |
| 410 | 415 |
| 411 // Pointer to the RenderView that owns us. | 416 // Pointer to the RenderView that owns us. |
| 412 RenderViewImpl* render_view_; | 417 RenderViewImpl* render_view_; |
| 413 | 418 |
| 419 // Connection for sending and receiving pepper host-related messages to/from |
| 420 // the browser. |
| 421 PepperBrowserConnection pepper_browser_connection_; |
| 422 |
| 414 std::set<webkit::ppapi::PluginInstance*> active_instances_; | 423 std::set<webkit::ppapi::PluginInstance*> active_instances_; |
| 415 typedef std::map<webkit::ppapi::PluginInstance*, | 424 typedef std::map<webkit::ppapi::PluginInstance*, |
| 416 MouseLockDispatcher::LockTarget*> LockTargetMap; | 425 MouseLockDispatcher::LockTarget*> LockTargetMap; |
| 417 LockTargetMap mouse_lock_instances_; | 426 LockTargetMap mouse_lock_instances_; |
| 418 | 427 |
| 419 IDMap<AsyncOpenFileCallback> pending_async_open_files_; | 428 IDMap<AsyncOpenFileCallback> pending_async_open_files_; |
| 420 | 429 |
| 421 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; | 430 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; |
| 422 | 431 |
| 423 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; | 432 IDMap<ppapi::PPB_TCPServerSocket_Shared> tcp_server_sockets_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 448 device_enumeration_event_handler_; | 457 device_enumeration_event_handler_; |
| 449 | 458 |
| 450 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; | 459 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; |
| 451 | 460 |
| 452 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 461 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 453 }; | 462 }; |
| 454 | 463 |
| 455 } // namespace content | 464 } // namespace content |
| 456 | 465 |
| 457 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 466 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |