OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 9 |
10 #include "base/callback_old.h" | 10 #include "base/callback_old.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // of the callback. | 165 // of the callback. |
166 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 166 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; |
167 | 167 |
168 // If the plugin instance is backed by an OpenGL, return its ID in the | 168 // If the plugin instance is backed by an OpenGL, return its ID in the |
169 // compositors namespace. Otherwise return 0. Returns 0 by default. | 169 // compositors namespace. Otherwise return 0. Returns 0 by default. |
170 virtual unsigned GetBackingTextureId() = 0; | 170 virtual unsigned GetBackingTextureId() = 0; |
171 | 171 |
172 // This call will return the address of the command buffer for this context | 172 // This call will return the address of the command buffer for this context |
173 // that is constructed in Initialize() and is valid until this context is | 173 // that is constructed in Initialize() and is valid until this context is |
174 // destroyed. | 174 // destroyed. |
175 virtual gpu::CommandBuffer* GetCommandBuffer() = 0; | 175 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; |
176 | 176 |
177 // Set an optional callback that will be invoked when the context is lost | 177 // Set an optional callback that will be invoked when the context is lost |
178 // (e.g. gpu process crash). Takes ownership of the callback. | 178 // (e.g. gpu process crash). Takes ownership of the callback. |
179 virtual void SetContextLostCallback(Callback0::Type* callback) = 0; | 179 virtual void SetContextLostCallback(Callback0::Type* callback) = 0; |
180 }; | 180 }; |
181 | 181 |
182 class PlatformAudio { | 182 class PlatformAudio { |
183 public: | 183 public: |
184 class Client { | 184 class Client { |
185 protected: | 185 protected: |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; | 407 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; |
408 | 408 |
409 // Returns the current preferences. | 409 // Returns the current preferences. |
410 virtual ::ppapi::Preferences GetPreferences() = 0; | 410 virtual ::ppapi::Preferences GetPreferences() = 0; |
411 }; | 411 }; |
412 | 412 |
413 } // namespace ppapi | 413 } // namespace ppapi |
414 } // namespace webkit | 414 } // namespace webkit |
415 | 415 |
416 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 416 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |