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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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
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 <memory>
8
7 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
11 #include "ui/compositor/compositor.h" 12 #include "ui/compositor/compositor.h"
12 #include "ui/gfx/win/window_impl.h" 13 #include "ui/gfx/win/window_impl.h"
13 14
14 namespace ui { 15 namespace ui {
15 16
16 class TestCompositorHostWin : public TestCompositorHost, 17 class TestCompositorHostWin : public TestCompositorHost,
17 public gfx::WindowImpl { 18 public gfx::WindowImpl {
18 public: 19 public:
19 TestCompositorHostWin(const gfx::Rect& bounds, 20 TestCompositorHostWin(const gfx::Rect& bounds,
(...skipping 20 matching lines...) Expand all
40 compositor_->ScheduleFullRedraw(); 41 compositor_->ScheduleFullRedraw();
41 ValidateRect(hwnd(), NULL); 42 ValidateRect(hwnd(), NULL);
42 } 43 }
43 44
44 gfx::Size GetSize() { 45 gfx::Size GetSize() {
45 RECT r; 46 RECT r;
46 GetClientRect(hwnd(), &r); 47 GetClientRect(hwnd(), &r);
47 return gfx::Rect(r).size(); 48 return gfx::Rect(r).size();
48 } 49 }
49 50
50 scoped_ptr<ui::Compositor> compositor_; 51 std::unique_ptr<ui::Compositor> compositor_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin); 53 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostWin);
53 }; 54 };
54 55
55 TestCompositorHost* TestCompositorHost::Create( 56 TestCompositorHost* TestCompositorHost::Create(
56 const gfx::Rect& bounds, 57 const gfx::Rect& bounds,
57 ui::ContextFactory* context_factory) { 58 ui::ContextFactory* context_factory) {
58 return new TestCompositorHostWin(bounds, context_factory); 59 return new TestCompositorHostWin(bounds, context_factory);
59 } 60 }
60 61
61 } // namespace ui 62 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_ozone.cc ('k') | ui/compositor/test/test_compositor_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698