Chromium Code Reviews| Index: app/gfx/gl/gl_context.h |
| diff --git a/app/gfx/gl/gl_context.h b/app/gfx/gl/gl_context.h |
| index 865af76595da34d8ab6d70e7ecfd6222e39092e4..55371a2fcde5be2ee44a93d4426cd9e24ff6ae9d 100644 |
| --- a/app/gfx/gl/gl_context.h |
| +++ b/app/gfx/gl/gl_context.h |
| @@ -8,6 +8,9 @@ |
| #include <string> |
| +#include "base/callback.h" |
| +#include "base/basictypes.h" |
| +#include "base/scoped_ptr.h" |
| #include "build/build_config.h" |
| #include "gfx/native_widget_types.h" |
| #include "gfx/size.h" |
| @@ -36,10 +39,11 @@ class GLContext { |
| // contexts. |
| virtual bool SwapBuffers() = 0; |
| - // Set the size of the back buffer. |
| - // FIXME(backer): Currently a NOP. Once we have an implementation for each |
| - // backend we can switch it to pure virtual. |
| - virtual void SetSize(gfx::Size) {} |
| + // Set the size of the back buffer. Calls the callback. |
|
nduca
2010/11/23 16:59:49
Is there a way to put this callback on the GL-spec
jonathan.backer
2010/11/23 21:00:19
Done.
|
| + virtual void SetSize(gfx::Size size); |
| + |
| + // Sometimes used to delegate resizing the back buffer. |
| + virtual void RegisterSetSizeCallback(Callback1<gfx::Size>::Type* callback); |
| // Get the size of the back buffer. |
| virtual gfx::Size GetSize() = 0; |
| @@ -75,6 +79,8 @@ class GLContext { |
| bool InitializeCommon(); |
| private: |
| + scoped_ptr<Callback1<gfx::Size>::Type> set_size_callback_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(GLContext); |
| }; |