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