| 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> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 struct ChannelHandle; | 34 struct ChannelHandle; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace ppapi { | 37 namespace ppapi { |
| 38 class PepperFilePath; | 38 class PepperFilePath; |
| 39 class PPB_X509Certificate_Fields; | 39 class PPB_X509Certificate_Fields; |
| 40 class PpapiPermissions; | 40 class PpapiPermissions; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace webkit { | 43 namespace webkit { |
| 44 struct WebPluginInfo; | |
| 45 namespace ppapi { | 44 namespace ppapi { |
| 46 class PluginInstance; | 45 class PluginInstance; |
| 47 class PluginModule; | 46 class PluginModule; |
| 48 } | 47 } |
| 49 } | 48 } |
| 50 | 49 |
| 51 namespace WebKit { | 50 namespace WebKit { |
| 52 class WebGamepads; | 51 class WebGamepads; |
| 53 struct WebCompositionUnderline; | 52 struct WebCompositionUnderline; |
| 54 } | 53 } |
| 55 | 54 |
| 56 namespace content { | 55 namespace content { |
| 57 class ContextProviderCommandBuffer; | 56 class ContextProviderCommandBuffer; |
| 58 class GamepadSharedMemoryReader; | 57 class GamepadSharedMemoryReader; |
| 59 class PepperBrokerImpl; | 58 class PepperBrokerImpl; |
| 60 class PepperDeviceEnumerationEventHandler; | 59 class PepperDeviceEnumerationEventHandler; |
| 61 class RenderViewImpl; | 60 class RenderViewImpl; |
| 61 struct WebPluginInfo; |
| 62 | 62 |
| 63 class PepperPluginDelegateImpl | 63 class PepperPluginDelegateImpl |
| 64 : public webkit::ppapi::PluginDelegate, | 64 : public webkit::ppapi::PluginDelegate, |
| 65 public RenderViewPepperHelper, | 65 public RenderViewPepperHelper, |
| 66 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 66 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
| 67 public RenderViewObserver { | 67 public RenderViewObserver { |
| 68 public: | 68 public: |
| 69 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 69 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
| 70 virtual ~PepperPluginDelegateImpl(); | 70 virtual ~PepperPluginDelegateImpl(); |
| 71 | 71 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // OpenDevice(). It is guaranteed that the callback passed into OpenDevice() | 107 // OpenDevice(). It is guaranteed that the callback passed into OpenDevice() |
| 108 // won't be called afterwards. | 108 // won't be called afterwards. |
| 109 void CancelOpenDevice(int request_id); | 109 void CancelOpenDevice(int request_id); |
| 110 void CloseDevice(const std::string& label); | 110 void CloseDevice(const std::string& label); |
| 111 // Gets audio/video session ID given a label. | 111 // Gets audio/video session ID given a label. |
| 112 int GetSessionID(PP_DeviceType_Dev type, const std::string& label); | 112 int GetSessionID(PP_DeviceType_Dev type, const std::string& label); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 // RenderViewPepperHelper implementation. | 115 // RenderViewPepperHelper implementation. |
| 116 virtual WebKit::WebPlugin* CreatePepperWebPlugin( | 116 virtual WebKit::WebPlugin* CreatePepperWebPlugin( |
| 117 const webkit::WebPluginInfo& webplugin_info, | 117 const WebPluginInfo& webplugin_info, |
| 118 const WebKit::WebPluginParams& params) OVERRIDE; | 118 const WebKit::WebPluginParams& params) OVERRIDE; |
| 119 virtual void ViewWillInitiatePaint() OVERRIDE; | 119 virtual void ViewWillInitiatePaint() OVERRIDE; |
| 120 virtual void ViewInitiatedPaint() OVERRIDE; | 120 virtual void ViewInitiatedPaint() OVERRIDE; |
| 121 virtual void ViewFlushedPaint() OVERRIDE; | 121 virtual void ViewFlushedPaint() OVERRIDE; |
| 122 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( | 122 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( |
| 123 const gfx::Rect& paint_bounds, | 123 const gfx::Rect& paint_bounds, |
| 124 TransportDIB** dib, | 124 TransportDIB** dib, |
| 125 gfx::Rect* location, | 125 gfx::Rect* location, |
| 126 gfx::Rect* clip, | 126 gfx::Rect* clip, |
| 127 float* scale_factor) OVERRIDE; | 127 float* scale_factor) OVERRIDE; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // Attempts to create a PPAPI plugin for the given filepath. On success, it | 378 // Attempts to create a PPAPI plugin for the given filepath. On success, it |
| 379 // will return the newly-created module. | 379 // will return the newly-created module. |
| 380 // | 380 // |
| 381 // There are two reasons for failure. The first is that the plugin isn't | 381 // There are two reasons for failure. The first is that the plugin isn't |
| 382 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set | 382 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set |
| 383 // to false and the caller may want to fall back on creating an NPAPI plugin. | 383 // to false and the caller may want to fall back on creating an NPAPI plugin. |
| 384 // the second is that the plugin failed to initialize. In this case, | 384 // the second is that the plugin failed to initialize. In this case, |
| 385 // |*pepper_plugin_was_registered| will be set to true and the caller should | 385 // |*pepper_plugin_was_registered| will be set to true and the caller should |
| 386 // not fall back on any other plugin types. | 386 // not fall back on any other plugin types. |
| 387 scoped_refptr<webkit::ppapi::PluginModule> | 387 scoped_refptr<webkit::ppapi::PluginModule> |
| 388 CreatePepperPluginModule( | 388 CreatePepperPluginModule(const WebPluginInfo& webplugin_info, |
| 389 const webkit::WebPluginInfo& webplugin_info, | 389 bool* pepper_plugin_was_registered); |
| 390 bool* pepper_plugin_was_registered); | |
| 391 | 390 |
| 392 // Asynchronously attempts to create a PPAPI broker for the given plugin. | 391 // Asynchronously attempts to create a PPAPI broker for the given plugin. |
| 393 scoped_refptr<PepperBrokerImpl> CreateBroker( | 392 scoped_refptr<PepperBrokerImpl> CreateBroker( |
| 394 webkit::ppapi::PluginModule* plugin_module); | 393 webkit::ppapi::PluginModule* plugin_module); |
| 395 | 394 |
| 396 // Create a new HostDispatcher for proxying, hook it to the PluginModule, | 395 // Create a new HostDispatcher for proxying, hook it to the PluginModule, |
| 397 // and perform other common initialization. | 396 // and perform other common initialization. |
| 398 RendererPpapiHost* CreateOutOfProcessModule( | 397 RendererPpapiHost* CreateOutOfProcessModule( |
| 399 webkit::ppapi::PluginModule* module, | 398 webkit::ppapi::PluginModule* module, |
| 400 const base::FilePath& path, | 399 const base::FilePath& path, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 device_enumeration_event_handler_; | 462 device_enumeration_event_handler_; |
| 464 | 463 |
| 465 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; | 464 scoped_refptr<ContextProviderCommandBuffer> offscreen_context3d_; |
| 466 | 465 |
| 467 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 466 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
| 468 }; | 467 }; |
| 469 | 468 |
| 470 } // namespace content | 469 } // namespace content |
| 471 | 470 |
| 472 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 471 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |