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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const = 0; | 164 virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const = 0; |
165 | 165 |
166 virtual TransportDIB* GetTransportDIB() const = 0; | 166 virtual TransportDIB* GetTransportDIB() const = 0; |
167 }; | 167 }; |
168 | 168 |
169 class PlatformContext3D { | 169 class PlatformContext3D { |
170 public: | 170 public: |
171 virtual ~PlatformContext3D() {} | 171 virtual ~PlatformContext3D() {} |
172 | 172 |
173 // Initialize the context. | 173 // Initialize the context. |
174 virtual bool Init(const int32* attrib_list) = 0; | 174 virtual bool Init(const int32* attrib_list, |
| 175 PlatformContext3D* share_context) = 0; |
175 | 176 |
176 // If the plugin instance is backed by an OpenGL, return its ID in the | 177 // If the plugin instance is backed by an OpenGL, return its ID in the |
177 // compositors namespace. Otherwise return 0. Returns 0 by default. | 178 // compositors namespace. Otherwise return 0. Returns 0 by default. |
178 virtual unsigned GetBackingTextureId() = 0; | 179 virtual unsigned GetBackingTextureId() = 0; |
179 | 180 |
180 // Returns true if the backing texture is always opaque. | 181 // Returns true if the backing texture is always opaque. |
181 virtual bool IsOpaque() = 0; | 182 virtual bool IsOpaque() = 0; |
182 | 183 |
183 // This call will return the address of the command buffer for this context | 184 // This call will return the address of the command buffer for this context |
184 // that is constructed in Initialize() and is valid until this context is | 185 // that is constructed in Initialize() and is valid until this context is |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; | 636 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; |
636 | 637 |
637 // Returns a Device ID | 638 // Returns a Device ID |
638 virtual std::string GetDeviceID() = 0; | 639 virtual std::string GetDeviceID() = 0; |
639 }; | 640 }; |
640 | 641 |
641 } // namespace ppapi | 642 } // namespace ppapi |
642 } // namespace webkit | 643 } // namespace webkit |
643 | 644 |
644 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 645 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |