OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/views/mus/views_mus_test_suite.h" | 5 #include "ui/views/mus/views_mus_test_suite.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 private: | 53 private: |
54 std::unique_ptr<WindowManagerConnection> connection_; | 54 std::unique_ptr<WindowManagerConnection> connection_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus); | 56 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus); |
57 }; | 57 }; |
58 | 58 |
59 std::unique_ptr<PlatformTestHelper> CreatePlatformTestHelper( | 59 std::unique_ptr<PlatformTestHelper> CreatePlatformTestHelper( |
60 const shell::Identity& identity, | 60 const shell::Identity& identity, |
61 const base::Callback<shell::Connector*(void)>& callback) { | 61 const base::Callback<shell::Connector*(void)>& callback) { |
62 return base::WrapUnique(new PlatformTestHelperMus(callback.Run(), identity)); | 62 return base::MakeUnique<PlatformTestHelperMus>(callback.Run(), identity); |
63 } | 63 } |
64 | 64 |
65 } // namespace | 65 } // namespace |
66 | 66 |
67 class ShellConnection { | 67 class ShellConnection { |
68 public: | 68 public: |
69 ShellConnection() : thread_("Persistent shell connections") { | 69 ShellConnection() : thread_("Persistent shell connections") { |
70 base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::AUTOMATIC, | 70 base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
71 base::WaitableEvent::InitialState::NOT_SIGNALED); | 71 base::WaitableEvent::InitialState::NOT_SIGNALED); |
72 base::Thread::Options options; | 72 base::Thread::Options options; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 ViewsTestSuite::Initialize(); | 168 ViewsTestSuite::Initialize(); |
169 shell_connections_.reset(new ShellConnection); | 169 shell_connections_.reset(new ShellConnection); |
170 } | 170 } |
171 | 171 |
172 void ViewsMusTestSuite::Shutdown() { | 172 void ViewsMusTestSuite::Shutdown() { |
173 shell_connections_.reset(); | 173 shell_connections_.reset(); |
174 ViewsTestSuite::Shutdown(); | 174 ViewsTestSuite::Shutdown(); |
175 } | 175 } |
176 | 176 |
177 } // namespace views | 177 } // namespace views |
OLD | NEW |