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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review cleanup Created 6 years, 6 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) 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/compositor/compositor.h" 9 #include "ui/compositor/compositor.h"
10 #include "ui/gfx/win/window_impl.h" 10 #include "ui/gfx/win/window_impl.h"
(...skipping 21 matching lines...) Expand all
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 private: 36 private:
37 CR_BEGIN_MSG_MAP_EX(TestCompositorHostWin) 37 CR_BEGIN_MSG_MAP_EX(TestCompositorHostWin)
38 CR_MSG_WM_PAINT(OnPaint) 38 CR_MSG_WM_PAINT(OnPaint)
39 CR_END_MSG_MAP() 39 CR_END_MSG_MAP()
40 40
41 void OnPaint(HDC dc) { 41 void OnPaint(HDC dc) {
42 compositor_->Draw(); 42 compositor_->ScheduleFullRedraw();
43 ValidateRect(hwnd(), NULL); 43 ValidateRect(hwnd(), NULL);
44 } 44 }
45 45
46 gfx::Size GetSize() { 46 gfx::Size GetSize() {
47 RECT r; 47 RECT r;
48 GetClientRect(hwnd(), &r); 48 GetClientRect(hwnd(), &r);
49 return gfx::Rect(r).size(); 49 return gfx::Rect(r).size();
50 } 50 }
51 51
52 scoped_ptr<ui::Compositor> compositor_; 52 scoped_ptr<ui::Compositor> compositor_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin); 54 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
55 }; 55 };
56 56
57 TestCompositorHost* TestCompositorHost::Create( 57 TestCompositorHost* TestCompositorHost::Create(
58 const gfx::Rect& bounds, 58 const gfx::Rect& bounds,
59 ui::ContextFactory* context_factory) { 59 ui::ContextFactory* context_factory) {
60 return new TestCompositorHostWin(bounds, context_factory); 60 return new TestCompositorHostWin(bounds, context_factory);
61 } 61 }
62 62
63 } // namespace ui 63 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698