| 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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 namespace fileapi { | 56 namespace fileapi { |
| 57 struct DirectoryEntry; | 57 struct DirectoryEntry; |
| 58 } | 58 } |
| 59 | 59 |
| 60 namespace gfx { | 60 namespace gfx { |
| 61 class Point; | 61 class Point; |
| 62 } | 62 } |
| 63 | 63 |
| 64 namespace gpu { | 64 namespace gpu { |
| 65 class CommandBuffer; | 65 class CommandBuffer; |
| 66 struct Mailbox; |
| 66 } | 67 } |
| 67 | 68 |
| 68 namespace ppapi { | 69 namespace ppapi { |
| 69 class PepperFilePath; | 70 class PepperFilePath; |
| 70 class PPB_X509Certificate_Fields; | 71 class PPB_X509Certificate_Fields; |
| 71 struct DeviceRefData; | 72 struct DeviceRefData; |
| 72 struct HostPortPair; | 73 struct HostPortPair; |
| 73 struct Preferences; | 74 struct Preferences; |
| 74 | 75 |
| 75 namespace thunk { | 76 namespace thunk { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 }; | 213 }; |
| 213 | 214 |
| 214 class PlatformContext3D { | 215 class PlatformContext3D { |
| 215 public: | 216 public: |
| 216 virtual ~PlatformContext3D() {} | 217 virtual ~PlatformContext3D() {} |
| 217 | 218 |
| 218 // Initialize the context. | 219 // Initialize the context. |
| 219 virtual bool Init(const int32* attrib_list, | 220 virtual bool Init(const int32* attrib_list, |
| 220 PlatformContext3D* share_context) = 0; | 221 PlatformContext3D* share_context) = 0; |
| 221 | 222 |
| 222 // If the plugin instance is backed by an OpenGL, return its ID in the | 223 // Retrieves the mailbox name for the front buffer backing the context. |
| 223 // compositors namespace. Otherwise return 0. Returns 0 by default. | 224 virtual void GetBackingMailbox(::gpu::Mailbox* mailbox) = 0; |
| 224 virtual unsigned GetBackingTextureId() = 0; | |
| 225 | |
| 226 // Returns the parent context that allocated the backing texture ID. | |
| 227 virtual WebKit::WebGraphicsContext3D* GetParentContext() = 0; | |
| 228 | 225 |
| 229 // Returns true if the backing texture is always opaque. | 226 // Returns true if the backing texture is always opaque. |
| 230 virtual bool IsOpaque() = 0; | 227 virtual bool IsOpaque() = 0; |
| 231 | 228 |
| 232 // This call will return the address of the command buffer for this context | 229 // This call will return the address of the command buffer for this context |
| 233 // that is constructed in Initialize() and is valid until this context is | 230 // that is constructed in Initialize() and is valid until this context is |
| 234 // destroyed. | 231 // destroyed. |
| 235 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; | 232 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; |
| 236 | 233 |
| 237 // If the command buffer is routed in the GPU channel, return the route id. | 234 // If the command buffer is routed in the GPU channel, return the route id. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // The caller will own the pointer returned from this. | 402 // The caller will own the pointer returned from this. |
| 406 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; | 403 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; |
| 407 | 404 |
| 408 // Returns the internal PlatformGraphics2D implementation. | 405 // Returns the internal PlatformGraphics2D implementation. |
| 409 virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance, | 406 virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance, |
| 410 PP_Resource graphics_2d) = 0; | 407 PP_Resource graphics_2d) = 0; |
| 411 | 408 |
| 412 // The caller will own the pointer returned from this. | 409 // The caller will own the pointer returned from this. |
| 413 virtual PlatformContext3D* CreateContext3D() = 0; | 410 virtual PlatformContext3D* CreateContext3D() = 0; |
| 414 | 411 |
| 415 // Set that the context will now present to the delegate. | |
| 416 virtual void ReparentContext(PlatformContext3D*) = 0; | |
| 417 | |
| 418 // If |device_id| is empty, the default video capture device will be used. The | 412 // If |device_id| is empty, the default video capture device will be used. The |
| 419 // user can start using the returned object to capture video right away. | 413 // user can start using the returned object to capture video right away. |
| 420 // Otherwise, the specified device will be used. The user needs to wait till | 414 // Otherwise, the specified device will be used. The user needs to wait till |
| 421 // |handler| gets an OnInitialized() notification to start using the returned | 415 // |handler| gets an OnInitialized() notification to start using the returned |
| 422 // object. | 416 // object. |
| 423 virtual PlatformVideoCapture* CreateVideoCapture( | 417 virtual PlatformVideoCapture* CreateVideoCapture( |
| 424 const std::string& device_id, | 418 const std::string& device_id, |
| 425 PlatformVideoCaptureEventHandler* handler) = 0; | 419 PlatformVideoCaptureEventHandler* handler) = 0; |
| 426 | 420 |
| 427 // The caller will own the pointer returned from this. | 421 // The caller will own the pointer returned from this. |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 // The loader object should set itself on the PluginInstance as the document | 692 // The loader object should set itself on the PluginInstance as the document |
| 699 // loader using set_document_loader. | 693 // loader using set_document_loader. |
| 700 virtual void HandleDocumentLoad(PluginInstance* instance, | 694 virtual void HandleDocumentLoad(PluginInstance* instance, |
| 701 const WebKit::WebURLResponse& response) = 0; | 695 const WebKit::WebURLResponse& response) = 0; |
| 702 }; | 696 }; |
| 703 | 697 |
| 704 } // namespace ppapi | 698 } // namespace ppapi |
| 705 } // namespace webkit | 699 } // namespace webkit |
| 706 | 700 |
| 707 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 701 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |