| 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 #ifndef UI_VIEWS_MUS_TEST_UTILS_H_ | 5 #ifndef UI_VIEWS_MUS_TEST_UTILS_H_ |
| 6 #define UI_VIEWS_MUS_TEST_UTILS_H_ | 6 #define UI_VIEWS_MUS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "ui/views/mus/mus_client.h" | 9 #include "ui/views/mus/mus_client.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 namespace test { | 12 namespace test { |
| 13 | 13 |
| 14 class MusClientTestApi { | 14 class MusClientTestApi { |
| 15 public: | 15 public: |
| 16 static std::unique_ptr<MusClient> Create( | 16 static std::unique_ptr<MusClient> Create( |
| 17 service_manager::Connector* connector, | 17 service_manager::Connector* connector, |
| 18 const service_manager::Identity& identity) { | 18 const service_manager::Identity& identity) { |
| 19 return base::WrapUnique(new MusClient(connector, identity)); | 19 return base::WrapUnique(new MusClient(connector, identity)); |
| 20 } | 20 } |
| 21 | 21 |
| 22 static void SetChangeTestObserver(MusClientTestObserver* observer) { |
| 23 MusClient::Get()->test_observer_ = observer; |
| 24 } |
| 25 |
| 22 private: | 26 private: |
| 23 DISALLOW_IMPLICIT_CONSTRUCTORS(MusClientTestApi); | 27 DISALLOW_IMPLICIT_CONSTRUCTORS(MusClientTestApi); |
| 24 }; | 28 }; |
| 25 | 29 |
| 26 } // namespace test | 30 } // namespace test |
| 27 } // namespace views | 31 } // namespace views |
| 28 | 32 |
| 29 #endif // UI_VIEWS_MUS_TEST_UTILS_H_ | 33 #endif // UI_VIEWS_MUS_TEST_UTILS_H_ |
| OLD | NEW |