Chromium Code Reviews| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop_proxy.h" | 13 #include "base/message_loop_proxy.h" |
| 14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/sync_socket.h" | 17 #include "base/sync_socket.h" |
| 18 #include "base/time.h" | 18 #include "base/time.h" |
| 19 #include "cc/resources/texture_mailbox.h" | |
| 19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 20 #include "ipc/ipc_platform_file.h" | 21 #include "ipc/ipc_platform_file.h" |
| 21 #include "media/video/capture/video_capture.h" | 22 #include "media/video/capture/video_capture.h" |
| 22 #include "media/video/video_decode_accelerator.h" | 23 #include "media/video/video_decode_accelerator.h" |
| 23 #include "ppapi/c/dev/pp_video_dev.h" | 24 #include "ppapi/c/dev/pp_video_dev.h" |
| 24 #include "ppapi/c/dev/ppb_device_ref_dev.h" | 25 #include "ppapi/c/dev/ppb_device_ref_dev.h" |
| 25 #include "ppapi/c/pp_completion_callback.h" | 26 #include "ppapi/c/pp_completion_callback.h" |
| 26 #include "ppapi/c/pp_errors.h" | 27 #include "ppapi/c/pp_errors.h" |
| 27 #include "ppapi/c/pp_file_info.h" | 28 #include "ppapi/c/pp_file_info.h" |
| 28 #include "ppapi/c/pp_instance.h" | 29 #include "ppapi/c/pp_instance.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 56 namespace fileapi { | 57 namespace fileapi { |
| 57 struct DirectoryEntry; | 58 struct DirectoryEntry; |
| 58 } | 59 } |
| 59 | 60 |
| 60 namespace gfx { | 61 namespace gfx { |
| 61 class Point; | 62 class Point; |
| 62 } | 63 } |
| 63 | 64 |
| 64 namespace gpu { | 65 namespace gpu { |
| 65 class CommandBuffer; | 66 class CommandBuffer; |
| 67 struct Mailbox; | |
| 66 } | 68 } |
| 67 | 69 |
| 68 namespace ppapi { | 70 namespace ppapi { |
| 69 class PepperFilePath; | 71 class PepperFilePath; |
| 70 class PPB_X509Certificate_Fields; | 72 class PPB_X509Certificate_Fields; |
| 71 struct DeviceRefData; | 73 struct DeviceRefData; |
| 72 struct HostPortPair; | 74 struct HostPortPair; |
| 73 struct Preferences; | 75 struct Preferences; |
| 74 | 76 |
| 75 namespace thunk { | 77 namespace thunk { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 }; | 214 }; |
| 213 | 215 |
| 214 class PlatformContext3D { | 216 class PlatformContext3D { |
| 215 public: | 217 public: |
| 216 virtual ~PlatformContext3D() {} | 218 virtual ~PlatformContext3D() {} |
| 217 | 219 |
| 218 // Initialize the context. | 220 // Initialize the context. |
| 219 virtual bool Init(const int32* attrib_list, | 221 virtual bool Init(const int32* attrib_list, |
| 220 PlatformContext3D* share_context) = 0; | 222 PlatformContext3D* share_context) = 0; |
| 221 | 223 |
| 222 // If the plugin instance is backed by an OpenGL, return its ID in the | 224 // If the plugin instance is backed by an OpenGL texture, retrieves the |
| 223 // compositors namespace. Otherwise return 0. Returns 0 by default. | 225 // mailbox identifier and sync_point, and return true. Otherwise return |
|
danakj
2013/06/05 14:13:33
Where's the sync point that this comment speaks of
piman
2013/06/05 17:57:55
Sorry, copy & paste from the future. Fixed.
| |
| 224 virtual unsigned GetBackingTextureId() = 0; | 226 // false. |
| 225 | 227 virtual void GetBackingMailbox(::gpu::Mailbox* mailbox) = 0; |
| 226 // Returns the parent context that allocated the backing texture ID. | |
| 227 virtual WebKit::WebGraphicsContext3D* GetParentContext() = 0; | |
| 228 | 228 |
| 229 // Returns true if the backing texture is always opaque. | 229 // Returns true if the backing texture is always opaque. |
| 230 virtual bool IsOpaque() = 0; | 230 virtual bool IsOpaque() = 0; |
| 231 | 231 |
| 232 // This call will return the address of the command buffer for this context | 232 // 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 | 233 // that is constructed in Initialize() and is valid until this context is |
| 234 // destroyed. | 234 // destroyed. |
| 235 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; | 235 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; |
| 236 | 236 |
| 237 // If the command buffer is routed in the GPU channel, return the route id. | 237 // 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. | 405 // The caller will own the pointer returned from this. |
| 406 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; | 406 virtual PlatformImage2D* CreateImage2D(int width, int height) = 0; |
| 407 | 407 |
| 408 // Returns the internal PlatformGraphics2D implementation. | 408 // Returns the internal PlatformGraphics2D implementation. |
| 409 virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance, | 409 virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance, |
| 410 PP_Resource graphics_2d) = 0; | 410 PP_Resource graphics_2d) = 0; |
| 411 | 411 |
| 412 // The caller will own the pointer returned from this. | 412 // The caller will own the pointer returned from this. |
| 413 virtual PlatformContext3D* CreateContext3D() = 0; | 413 virtual PlatformContext3D* CreateContext3D() = 0; |
| 414 | 414 |
| 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 | 415 // 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. | 416 // 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 | 417 // Otherwise, the specified device will be used. The user needs to wait till |
| 421 // |handler| gets an OnInitialized() notification to start using the returned | 418 // |handler| gets an OnInitialized() notification to start using the returned |
| 422 // object. | 419 // object. |
| 423 virtual PlatformVideoCapture* CreateVideoCapture( | 420 virtual PlatformVideoCapture* CreateVideoCapture( |
| 424 const std::string& device_id, | 421 const std::string& device_id, |
| 425 PlatformVideoCaptureEventHandler* handler) = 0; | 422 PlatformVideoCaptureEventHandler* handler) = 0; |
| 426 | 423 |
| 427 // The caller will own the pointer returned from this. | 424 // 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 | 695 // The loader object should set itself on the PluginInstance as the document |
| 699 // loader using set_document_loader. | 696 // loader using set_document_loader. |
| 700 virtual void HandleDocumentLoad(PluginInstance* instance, | 697 virtual void HandleDocumentLoad(PluginInstance* instance, |
| 701 const WebKit::WebURLResponse& response) = 0; | 698 const WebKit::WebURLResponse& response) = 0; |
| 702 }; | 699 }; |
| 703 | 700 |
| 704 } // namespace ppapi | 701 } // namespace ppapi |
| 705 } // namespace webkit | 702 } // namespace webkit |
| 706 | 703 |
| 707 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 704 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |