| 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_H_ | 
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_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/pepper/pepper_browser_connection.h" | 20 #include "content/renderer/pepper/pepper_browser_connection.h" | 
| 21 #include "content/renderer/render_view_pepper_helper.h" | 21 #include "content/renderer/pepper_helper.h" | 
| 22 #include "ipc/ipc_platform_file.h" | 22 #include "ipc/ipc_platform_file.h" | 
| 23 #include "ppapi/c/pp_file_info.h" | 23 #include "ppapi/c/pp_file_info.h" | 
| 24 #include "ppapi/c/ppb_tcp_socket.h" | 24 #include "ppapi/c/ppb_tcp_socket.h" | 
| 25 #include "ppapi/c/private/ppb_tcp_socket_private.h" | 25 #include "ppapi/c/private/ppb_tcp_socket_private.h" | 
| 26 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 26 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 
| 27 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 27 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 
| 28 #include "ui/base/ime/text_input_type.h" | 28 #include "ui/base/ime/text_input_type.h" | 
| 29 | 29 | 
| 30 namespace base { | 30 namespace base { | 
| 31 class FilePath; | 31 class FilePath; | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 50 namespace content { | 50 namespace content { | 
| 51 class ContextProviderCommandBuffer; | 51 class ContextProviderCommandBuffer; | 
| 52 class GamepadSharedMemoryReader; | 52 class GamepadSharedMemoryReader; | 
| 53 class PepperBroker; | 53 class PepperBroker; | 
| 54 class PluginModule; | 54 class PluginModule; | 
| 55 class PPB_Broker_Impl; | 55 class PPB_Broker_Impl; | 
| 56 class PPB_TCPSocket_Private_Impl; | 56 class PPB_TCPSocket_Private_Impl; | 
| 57 class RenderViewImpl; | 57 class RenderViewImpl; | 
| 58 struct WebPluginInfo; | 58 struct WebPluginInfo; | 
| 59 | 59 | 
| 60 class PepperPluginDelegateImpl | 60 class PepperHelperImpl : public PepperHelper, | 
| 61     : public RenderViewPepperHelper, | 61                          public base::SupportsWeakPtr<PepperHelperImpl>, | 
| 62       public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 62                          public RenderViewObserver { | 
| 63       public RenderViewObserver { |  | 
| 64  public: | 63  public: | 
| 65   explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 64   explicit PepperHelperImpl(RenderViewImpl* render_view); | 
| 66   virtual ~PepperPluginDelegateImpl(); | 65   virtual ~PepperHelperImpl(); | 
| 67 | 66 | 
| 68   RenderViewImpl* render_view() { return render_view_; } | 67   RenderViewImpl* render_view() { return render_view_; } | 
| 69 | 68 | 
| 70   PepperBrowserConnection* pepper_browser_connection() { | 69   PepperBrowserConnection* pepper_browser_connection() { | 
| 71     return &pepper_browser_connection_; | 70     return &pepper_browser_connection_; | 
| 72   } | 71   } | 
| 73 | 72 | 
| 74   // A pointer is returned immediately, but it is not ready to be used until | 73   // A pointer is returned immediately, but it is not ready to be used until | 
| 75   // BrokerConnected has been called. | 74   // BrokerConnected has been called. | 
| 76   // The caller is responsible for calling Disconnect() on the returned pointer | 75   // The caller is responsible for calling Disconnect() on the returned pointer | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138   // module. Returns the renderer host, or NULL if it couldn't be created. | 137   // module. Returns the renderer host, or NULL if it couldn't be created. | 
| 139   RendererPpapiHost* CreateExternalPluginModule( | 138   RendererPpapiHost* CreateExternalPluginModule( | 
| 140       scoped_refptr<PluginModule> module, | 139       scoped_refptr<PluginModule> module, | 
| 141       const base::FilePath& path, | 140       const base::FilePath& path, | 
| 142       ::ppapi::PpapiPermissions permissions, | 141       ::ppapi::PpapiPermissions permissions, | 
| 143       const IPC::ChannelHandle& channel_handle, | 142       const IPC::ChannelHandle& channel_handle, | 
| 144       base::ProcessId plugin_pid, | 143       base::ProcessId plugin_pid, | 
| 145       int plugin_child_id); | 144       int plugin_child_id); | 
| 146 | 145 | 
| 147  private: | 146  private: | 
| 148   // RenderViewPepperHelper implementation. | 147   // PepperHelper implementation. | 
| 149   virtual WebKit::WebPlugin* CreatePepperWebPlugin( | 148   virtual WebKit::WebPlugin* CreatePepperWebPlugin( | 
| 150     const WebPluginInfo& webplugin_info, | 149     const WebPluginInfo& webplugin_info, | 
| 151     const WebKit::WebPluginParams& params) OVERRIDE; | 150     const WebKit::WebPluginParams& params) OVERRIDE; | 
| 152   virtual void ViewWillInitiatePaint() OVERRIDE; | 151   virtual void ViewWillInitiatePaint() OVERRIDE; | 
| 153   virtual void ViewInitiatedPaint() OVERRIDE; | 152   virtual void ViewInitiatedPaint() OVERRIDE; | 
| 154   virtual void ViewFlushedPaint() OVERRIDE; | 153   virtual void ViewFlushedPaint() OVERRIDE; | 
| 155   virtual PepperPluginInstanceImpl* GetBitmapForOptimizedPluginPaint( | 154   virtual PepperPluginInstanceImpl* GetBitmapForOptimizedPluginPaint( | 
| 156       const gfx::Rect& paint_bounds, | 155       const gfx::Rect& paint_bounds, | 
| 157       TransportDIB** dib, | 156       TransportDIB** dib, | 
| 158       gfx::Rect* location, | 157       gfx::Rect* location, | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 275   // The plugin instance that received the last mouse event. It is set to NULL | 274   // The plugin instance that received the last mouse event. It is set to NULL | 
| 276   // if the last mouse event went to elements other than Pepper plugins. | 275   // if the last mouse event went to elements other than Pepper plugins. | 
| 277   // |last_mouse_event_target_| is not owned by this class. We can know about | 276   // |last_mouse_event_target_| is not owned by this class. We can know about | 
| 278   // when it is destroyed via InstanceDeleted(). | 277   // when it is destroyed via InstanceDeleted(). | 
| 279   PepperPluginInstanceImpl* last_mouse_event_target_; | 278   PepperPluginInstanceImpl* last_mouse_event_target_; | 
| 280 | 279 | 
| 281   scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 280   scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 
| 282 | 281 | 
| 283   scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; | 282   scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; | 
| 284 | 283 | 
| 285   DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 284   DISALLOW_COPY_AND_ASSIGN(PepperHelperImpl); | 
| 286 }; | 285 }; | 
| 287 | 286 | 
| 288 }  // namespace content | 287 }  // namespace content | 
| 289 | 288 | 
| 290 #endif  // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 289 #endif  // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_H_ | 
| OLD | NEW | 
|---|