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/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 <memory> |
| 14 |
13 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
14 #include "base/mac/scoped_nsobject.h" | 16 #include "base/mac/scoped_nsobject.h" |
15 #include "base/macros.h" | 17 #include "base/macros.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
18 #include "ui/compositor/compositor.h" | 19 #include "ui/compositor/compositor.h" |
19 #include "ui/gfx/geometry/rect.h" | 20 #include "ui/gfx/geometry/rect.h" |
20 | 21 |
21 // AcceleratedTestView provides an NSView class that delegates drawing to a | 22 // AcceleratedTestView provides an NSView class that delegates drawing to a |
22 // ui::Compositor delegate, setting up the NSOpenGLContext as required. | 23 // ui::Compositor delegate, setting up the NSOpenGLContext as required. |
23 @interface AcceleratedTestView : NSView { | 24 @interface AcceleratedTestView : NSView { |
24 ui::Compositor* compositor_; | 25 ui::Compositor* compositor_; |
25 } | 26 } |
26 // Designated initializer. | 27 // Designated initializer. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 151 } |
151 | 152 |
152 // static | 153 // static |
153 TestCompositorHost* TestCompositorHost::Create( | 154 TestCompositorHost* TestCompositorHost::Create( |
154 const gfx::Rect& bounds, | 155 const gfx::Rect& bounds, |
155 ui::ContextFactory* context_factory) { | 156 ui::ContextFactory* context_factory) { |
156 return new TestCompositorHostMac(bounds, context_factory); | 157 return new TestCompositorHostMac(bounds, context_factory); |
157 } | 158 } |
158 | 159 |
159 } // namespace ui | 160 } // namespace ui |
OLD | NEW |