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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // Initialize the context. | 145 // Initialize the context. |
146 virtual bool Init() = 0; | 146 virtual bool Init() = 0; |
147 | 147 |
148 // Present the rendered frame to the compositor. | 148 // Present the rendered frame to the compositor. |
149 virtual bool SwapBuffers() = 0; | 149 virtual bool SwapBuffers() = 0; |
150 | 150 |
151 // Get the last EGL error. | 151 // Get the last EGL error. |
152 virtual unsigned GetError() = 0; | 152 virtual unsigned GetError() = 0; |
153 | 153 |
154 // Resize the backing texture used as a back buffer by OpenGL. | |
155 virtual void ResizeBackingTexture(const gfx::Size& size) = 0; | |
156 | |
157 // Set an optional callback that will be invoked when the side effects of | 154 // Set an optional callback that will be invoked when the side effects of |
158 // a SwapBuffers call become visible to the compositor. Takes ownership | 155 // a SwapBuffers call become visible to the compositor. Takes ownership |
159 // of the callback. | 156 // of the callback. |
160 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; | 157 virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; |
161 | 158 |
162 // If the plugin instance is backed by an OpenGL, return its ID in the | 159 // If the plugin instance is backed by an OpenGL, return its ID in the |
163 // compositors namespace. Otherwise return 0. Returns 0 by default. | 160 // compositors namespace. Otherwise return 0. Returns 0 by default. |
164 virtual unsigned GetBackingTextureId() = 0; | 161 virtual unsigned GetBackingTextureId() = 0; |
165 | 162 |
166 // This call will return the address of the GLES2 implementation for this | 163 // This call will return the address of the GLES2 implementation for this |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 virtual void SetContentRestriction(int restrictions) = 0; | 334 virtual void SetContentRestriction(int restrictions) = 0; |
338 | 335 |
339 // Tells the browser that the PDF has an unsupported feature. | 336 // Tells the browser that the PDF has an unsupported feature. |
340 virtual void HasUnsupportedFeature() = 0; | 337 virtual void HasUnsupportedFeature() = 0; |
341 }; | 338 }; |
342 | 339 |
343 } // namespace ppapi | 340 } // namespace ppapi |
344 } // namespace webkit | 341 } // namespace webkit |
345 | 342 |
346 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 343 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |