| 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 UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_NSVIEW_H_ |
| 6 #define UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | 6 #define UI_GFX_GL_GL_SURFACE_NSVIEW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/gfx/gl/gl_surface.h" | 9 #include "ui/gfx/gl/gl_surface.h" |
| 10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual ~GLSurfaceNSView(); | 22 virtual ~GLSurfaceNSView(); |
| 23 | 23 |
| 24 // GLSurface: | 24 // GLSurface: |
| 25 virtual void Destroy() OVERRIDE; | 25 virtual void Destroy() OVERRIDE; |
| 26 virtual bool IsOffscreen() OVERRIDE; | 26 virtual bool IsOffscreen() OVERRIDE; |
| 27 virtual bool SwapBuffers() OVERRIDE; | 27 virtual bool SwapBuffers() OVERRIDE; |
| 28 virtual gfx::Size GetSize() OVERRIDE; | 28 virtual gfx::Size GetSize() OVERRIDE; |
| 29 virtual void* GetHandle() OVERRIDE; | 29 virtual void* GetHandle() OVERRIDE; |
| 30 | 30 |
| 31 // Allow the surface to call back to context when in need of |FlushBuffer|. | 31 // Allow the surface to call back to context when in need of |FlushBuffer|. |
| 32 void SetGLContext(GLContextNSView* context); | 32 virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Weak. An |NSView*|. | 35 // Weak. An |NSView*|. |
| 36 PluginWindowHandle view_; | 36 PluginWindowHandle view_; |
| 37 | 37 |
| 38 // Weak. Associated context. | 38 // Weak. Associated context. |
| 39 GLContextNSView* context_; | 39 GLContextNSView* context_; |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(GLSurfaceNSView); | 41 DISALLOW_COPY_AND_ASSIGN(GLSurfaceNSView); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace gfx | 44 } // namespace gfx |
| 45 | 45 |
| 46 #endif // UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | 46 #endif // UI_GFX_GL_GL_SURFACE_NSVIEW_H_ |
| OLD | NEW |