Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ui/gfx/compositor/test/test_compositor_host_win.cc

Issue 9297041: Merge Compositor and CompositorCC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "ui/gfx/compositor/test/test_compositor_host.h" 5 #include "ui/gfx/compositor/test/test_compositor_host.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "ui/base/win/window_impl.h" 8 #include "ui/base/win/window_impl.h"
9 #include "ui/gfx/compositor/compositor.h" 9 #include "ui/gfx/compositor/compositor.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 class TestCompositorHostWin : public TestCompositorHost, 13 class TestCompositorHostWin : public TestCompositorHost,
14 public WindowImpl, 14 public WindowImpl,
15 public CompositorDelegate { 15 public CompositorDelegate {
16 public: 16 public:
17 TestCompositorHostWin(const gfx::Rect& bounds) { 17 TestCompositorHostWin(const gfx::Rect& bounds) {
18 Init(NULL, bounds); 18 Init(NULL, bounds);
19 compositor_ = ui::Compositor::Create(this, hwnd(), GetSize()); 19 compositor_ = new ui::Compositor(this, hwnd(), GetSize());
20 } 20 }
21 21
22 virtual ~TestCompositorHostWin() { 22 virtual ~TestCompositorHostWin() {
23 DestroyWindow(hwnd()); 23 DestroyWindow(hwnd());
24 } 24 }
25 25
26 // Overridden from MessageLoop::Dispatcher: 26 // Overridden from MessageLoop::Dispatcher:
27 virtual bool Dispatch(const MSG& msg) { 27 virtual bool Dispatch(const MSG& msg) {
28 TranslateMessage(&msg); 28 TranslateMessage(&msg);
29 DispatchMessage(&msg); 29 DispatchMessage(&msg);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 scoped_refptr<ui::Compositor> compositor_; 64 scoped_refptr<ui::Compositor> compositor_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin); 66 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
67 }; 67 };
68 68
69 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { 69 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
70 return new TestCompositorHostWin(bounds); 70 return new TestCompositorHostWin(bounds);
71 } 71 }
72 72
73 } // namespace ui 73 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test/test_compositor_host_mac.mm ('k') | ui/gfx/compositor/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698