Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_SCOPED_VIEWS_TEST_HELPER_H_ | 5 #ifndef UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ |
| 6 #define UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ | 6 #define UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // ContextFactory. | 30 // ContextFactory. |
| 31 explicit ScopedViewsTestHelper( | 31 explicit ScopedViewsTestHelper( |
| 32 std::unique_ptr<TestViewsDelegate> views_delegate); | 32 std::unique_ptr<TestViewsDelegate> views_delegate); |
| 33 | 33 |
| 34 ~ScopedViewsTestHelper(); | 34 ~ScopedViewsTestHelper(); |
| 35 | 35 |
| 36 // Returns the context for creating new windows. In Aura builds, this will be | 36 // Returns the context for creating new windows. In Aura builds, this will be |
| 37 // the RootWindow. Everywhere else, null. | 37 // the RootWindow. Everywhere else, null. |
| 38 gfx::NativeWindow GetContext(); | 38 gfx::NativeWindow GetContext(); |
| 39 | 39 |
| 40 TestViewsDelegate* views_delegate() { return views_delegate_.get(); }; | 40 TestViewsDelegate* test_views_delegate() { |
| 41 return test_views_delegate_.get(); | |
| 42 }; | |
|
sky
2017/04/12 22:43:58
remove trailing ;
kylix_rd
2017/04/13 16:45:42
Done.
| |
| 41 | 43 |
| 42 PlatformTestHelper* platform_test_helper() { | 44 PlatformTestHelper* platform_test_helper() { |
| 43 return platform_test_helper_.get(); | 45 return platform_test_helper_.get(); |
| 44 } | 46 } |
| 45 | 47 |
| 46 private: | 48 private: |
| 47 std::unique_ptr<TestViewsDelegate> views_delegate_; | 49 std::unique_ptr<TestViewsDelegate> test_views_delegate_; |
|
sky
2017/04/12 22:43:58
optional: leave existing name.
| |
| 48 std::unique_ptr<ViewsTestHelper> test_helper_; | 50 std::unique_ptr<ViewsTestHelper> test_helper_; |
| 49 std::unique_ptr<PlatformTestHelper> platform_test_helper_; | 51 std::unique_ptr<PlatformTestHelper> platform_test_helper_; |
| 50 | 52 |
| 51 DISALLOW_COPY_AND_ASSIGN(ScopedViewsTestHelper); | 53 DISALLOW_COPY_AND_ASSIGN(ScopedViewsTestHelper); |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace views | 56 } // namespace views |
| 55 | 57 |
| 56 #endif // UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ | 58 #endif // UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ |
| OLD | NEW |