OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | |
6 #define UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "ui/gfx/gl/gl_surface.h" | |
10 #include "ui/gfx/size.h" | |
11 | |
12 #if defined(__OBJC__) | |
13 @class NSView; | |
14 #else | |
15 class NSView; | |
16 #endif | |
Ken Russell (switch to Gerrit)
2011/11/17 00:14:40
It would be nicer to avoid this forward declaratio
dhollowa
2011/11/17 01:41:51
Done.
| |
17 | |
18 namespace gfx { | |
19 | |
20 // GLSurfaceNSView provides an implementation of the the GLSurface interface | |
21 // that is backed by an NSView. This interface pairs with the GLContextNSView | |
22 // class, and the NSView is expected to use this context for drawing. | |
23 class GLSurfaceNSView : public GLSurface { | |
24 public: | |
25 explicit GLSurfaceNSView(PluginWindowHandle view); | |
26 virtual ~GLSurfaceNSView(); | |
27 | |
28 // GLSurface: | |
29 virtual void Destroy() OVERRIDE; | |
30 virtual bool IsOffscreen() OVERRIDE; | |
31 virtual bool SwapBuffers() OVERRIDE; | |
32 virtual gfx::Size GetSize() OVERRIDE; | |
33 virtual void* GetHandle() OVERRIDE; | |
34 | |
35 private: | |
36 // Weak. | |
37 NSView* view_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(GLSurfaceNSView); | |
40 }; | |
41 | |
42 } // namespace gfx | |
43 | |
44 #endif // UI_GFX_GL_GL_SURFACE_NSVIEW_H_ | |
OLD | NEW |