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

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

Issue 13555004: Aura: Make compositor_unittests work with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Set the delegates. DCHECK not called if threaded. Created 7 years, 8 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
« no previous file with comments | « ui/compositor/test/test_compositor_host_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/base/win/window_impl.h" 9 #include "ui/base/win/window_impl.h"
10 #include "ui/compositor/compositor.h" 10 #include "ui/compositor/compositor.h"
(...skipping 17 matching lines...) Expand all
28 // Overridden from TestCompositorHost: 28 // Overridden from TestCompositorHost:
29 virtual void Show() OVERRIDE { 29 virtual void Show() OVERRIDE {
30 ShowWindow(hwnd(), SW_SHOWNORMAL); 30 ShowWindow(hwnd(), SW_SHOWNORMAL);
31 } 31 }
32 virtual ui::Compositor* GetCompositor() OVERRIDE { 32 virtual ui::Compositor* GetCompositor() OVERRIDE {
33 return compositor_.get(); 33 return compositor_.get();
34 } 34 }
35 35
36 // Overridden from CompositorDelegate: 36 // Overridden from CompositorDelegate:
37 virtual void ScheduleDraw() OVERRIDE { 37 virtual void ScheduleDraw() OVERRIDE {
38 DCHECK(!ui::Compositor::WasInitializedWithThread());
38 RECT rect; 39 RECT rect;
39 ::GetClientRect(hwnd(), &rect); 40 ::GetClientRect(hwnd(), &rect);
40 InvalidateRect(hwnd(), &rect, FALSE); 41 InvalidateRect(hwnd(), &rect, FALSE);
41 } 42 }
42 43
43 private: 44 private:
44 BEGIN_MSG_MAP_EX(TestCompositorHostWin) 45 BEGIN_MSG_MAP_EX(TestCompositorHostWin)
45 MSG_WM_PAINT(OnPaint) 46 MSG_WM_PAINT(OnPaint)
46 END_MSG_MAP() 47 END_MSG_MAP()
47 48
(...skipping 11 matching lines...) Expand all
59 scoped_ptr<ui::Compositor> compositor_; 60 scoped_ptr<ui::Compositor> compositor_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin); 62 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
62 }; 63 };
63 64
64 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { 65 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
65 return new TestCompositorHostWin(bounds); 66 return new TestCompositorHostWin(bounds);
66 } 67 }
67 68
68 } // namespace ui 69 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698