| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/gfx/compositor/test/test_compositor_host.h" | 5 #include "ui/compositor/test/test_compositor_host.h" |
| 6 | 6 |
| 7 #import <AppKit/NSApplication.h> | 7 #import <AppKit/NSApplication.h> |
| 8 #import <AppKit/NSOpenGL.h> | 8 #import <AppKit/NSOpenGL.h> |
| 9 #import <AppKit/NSView.h> | 9 #import <AppKit/NSView.h> |
| 10 #import <AppKit/NSWindow.h> | 10 #import <AppKit/NSWindow.h> |
| 11 #import <Foundation/NSAutoreleasePool.h> | 11 #import <Foundation/NSAutoreleasePool.h> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_nsobject.h" | 14 #include "base/memory/scoped_nsobject.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "ui/gfx/compositor/compositor.h" | 16 #include "ui/compositor/compositor.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 | 18 |
| 19 // AcceleratedTestView provides an NSView class that delegates drawing to a | 19 // AcceleratedTestView provides an NSView class that delegates drawing to a |
| 20 // ui::Compositor delegate, setting up the NSOpenGLContext as required. | 20 // ui::Compositor delegate, setting up the NSOpenGLContext as required. |
| 21 @interface AcceleratedTestView : NSView { | 21 @interface AcceleratedTestView : NSView { |
| 22 ui::Compositor* compositor_; | 22 ui::Compositor* compositor_; |
| 23 } | 23 } |
| 24 // Designated initializer. | 24 // Designated initializer. |
| 25 -(id)init; | 25 -(id)init; |
| 26 -(void)setCompositor:(ui::Compositor*)compositor; | 26 -(void)setCompositor:(ui::Compositor*)compositor; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Force display now. | 144 // Force display now. |
| 145 [window_ display]; | 145 [window_ display]; |
| 146 } | 146 } |
| 147 | 147 |
| 148 // static | 148 // static |
| 149 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { | 149 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { |
| 150 return new TestCompositorHostMac(bounds); | 150 return new TestCompositorHostMac(bounds); |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace ui | 153 } // namespace ui |
| OLD | NEW |