OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.h" | 10 #include "base/callback.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace fileapi { | 32 namespace fileapi { |
33 class FileSystemCallbackDispatcher; | 33 class FileSystemCallbackDispatcher; |
34 } | 34 } |
35 | 35 |
36 namespace gfx { | 36 namespace gfx { |
37 class Rect; | 37 class Rect; |
38 } | 38 } |
39 | 39 |
40 namespace gpu { | 40 namespace gpu { |
41 namespace gles2 { | 41 class CommandBuffer; |
42 class GLES2Implementation; | |
43 } | |
44 } | 42 } |
45 | 43 |
46 namespace skia { | 44 namespace skia { |
47 class PlatformCanvas; | 45 class PlatformCanvas; |
48 } | 46 } |
49 | 47 |
50 namespace WebKit { | 48 namespace WebKit { |
51 class WebFileChooserCompletion; | 49 class WebFileChooserCompletion; |
52 struct WebFileChooserParams; | 50 struct WebFileChooserParams; |
53 } | 51 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 virtual TransportDIB* GetTransportDIB() const = 0; | 136 virtual TransportDIB* GetTransportDIB() const = 0; |
139 }; | 137 }; |
140 | 138 |
141 class PlatformContext3D { | 139 class PlatformContext3D { |
142 public: | 140 public: |
143 virtual ~PlatformContext3D() {} | 141 virtual ~PlatformContext3D() {} |
144 | 142 |
145 // Initialize the context. | 143 // Initialize the context. |
146 virtual bool Init() = 0; | 144 virtual bool Init() = 0; |
147 | 145 |
148 // Present the rendered frame to the compositor. | |
149 virtual bool SwapBuffers() = 0; | |
150 | |
151 // Get the last EGL error. | |
152 virtual unsigned GetError() = 0; | |
153 | |
154 // Set an optional callback that will be invoked when the side effects of | 146 // Set an optional callback that will be invoked when the side effects of |
155 // a SwapBuffers call become visible to the compositor. Takes ownership | 147 // a SwapBuffers call become visible to the compositor. Takes ownership |
156 // of the callback. | 148 // of the callback. |
157 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 149 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; |
158 | 150 |
159 // If the plugin instance is backed by an OpenGL, return its ID in the | 151 // If the plugin instance is backed by an OpenGL, return its ID in the |
160 // compositors namespace. Otherwise return 0. Returns 0 by default. | 152 // compositors namespace. Otherwise return 0. Returns 0 by default. |
161 virtual unsigned GetBackingTextureId() = 0; | 153 virtual unsigned GetBackingTextureId() = 0; |
162 | 154 |
163 // This call will return the address of the GLES2 implementation for this | 155 // This call will return the address of the command buffer for this context |
164 // context that is constructed in Initialize() and is valid until this | 156 // that is constructed in Initialize() and is valid until this context is |
165 // context is destroyed. | 157 // destroyed. |
166 virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation() = 0; | 158 virtual gpu::CommandBuffer* GetCommandBuffer() = 0; |
167 }; | 159 }; |
168 | 160 |
169 class PlatformAudio { | 161 class PlatformAudio { |
170 public: | 162 public: |
171 class Client { | 163 class Client { |
172 protected: | 164 protected: |
173 virtual ~Client() {} | 165 virtual ~Client() {} |
174 | 166 |
175 public: | 167 public: |
176 // Called when the stream is created. | 168 // Called when the stream is created. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 virtual void SetContentRestriction(int restrictions) = 0; | 326 virtual void SetContentRestriction(int restrictions) = 0; |
335 | 327 |
336 // Tells the browser that the PDF has an unsupported feature. | 328 // Tells the browser that the PDF has an unsupported feature. |
337 virtual void HasUnsupportedFeature() = 0; | 329 virtual void HasUnsupportedFeature() = 0; |
338 }; | 330 }; |
339 | 331 |
340 } // namespace ppapi | 332 } // namespace ppapi |
341 } // namespace webkit | 333 } // namespace webkit |
342 | 334 |
343 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 335 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |