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

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

Issue 146833020: Remove some uses of ATL in UI code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « ui/base/win/hidden_window.cc ('k') | ui/gfx/win/msg_util.h » ('j') | 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/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 15 matching lines...) Expand all
26 26
27 // Overridden from TestCompositorHost: 27 // Overridden from TestCompositorHost:
28 virtual void Show() OVERRIDE { 28 virtual void Show() OVERRIDE {
29 ShowWindow(hwnd(), SW_SHOWNORMAL); 29 ShowWindow(hwnd(), SW_SHOWNORMAL);
30 } 30 }
31 virtual ui::Compositor* GetCompositor() OVERRIDE { 31 virtual ui::Compositor* GetCompositor() OVERRIDE {
32 return compositor_.get(); 32 return compositor_.get();
33 } 33 }
34 34
35 private: 35 private:
36 BEGIN_MSG_MAP_EX(TestCompositorHostWin) 36 CR_BEGIN_MSG_MAP_EX(TestCompositorHostWin)
37 MSG_WM_PAINT(OnPaint) 37 CR_MSG_WM_PAINT(OnPaint)
38 END_MSG_MAP() 38 CR_END_MSG_MAP()
39 39
40 void OnPaint(HDC dc) { 40 void OnPaint(HDC dc) {
41 compositor_->Draw(); 41 compositor_->Draw();
42 ValidateRect(hwnd(), NULL); 42 ValidateRect(hwnd(), NULL);
43 } 43 }
44 44
45 gfx::Size GetSize() { 45 gfx::Size GetSize() {
46 RECT r; 46 RECT r;
47 GetClientRect(hwnd(), &r); 47 GetClientRect(hwnd(), &r);
48 return gfx::Rect(r).size(); 48 return gfx::Rect(r).size();
49 } 49 }
50 50
51 scoped_ptr<ui::Compositor> compositor_; 51 scoped_ptr<ui::Compositor> compositor_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin); 53 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
54 }; 54 };
55 55
56 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { 56 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
57 return new TestCompositorHostWin(bounds); 57 return new TestCompositorHostWin(bounds);
58 } 58 }
59 59
60 } // namespace ui 60 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/hidden_window.cc ('k') | ui/gfx/win/msg_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698