| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // ContextFactory. | 29 // ContextFactory. |
| 30 explicit ScopedViewsTestHelper(scoped_ptr<TestViewsDelegate> views_delegate); | 30 explicit ScopedViewsTestHelper(scoped_ptr<TestViewsDelegate> views_delegate); |
| 31 | 31 |
| 32 ~ScopedViewsTestHelper(); | 32 ~ScopedViewsTestHelper(); |
| 33 | 33 |
| 34 // Returns the context for creating new windows. In Aura builds, this will be | 34 // Returns the context for creating new windows. In Aura builds, this will be |
| 35 // the RootWindow. Everywhere else, null. | 35 // the RootWindow. Everywhere else, null. |
| 36 gfx::NativeWindow GetContext(); | 36 gfx::NativeWindow GetContext(); |
| 37 | 37 |
| 38 TestViewsDelegate* views_delegate() { return views_delegate_.get(); }; | 38 TestViewsDelegate* views_delegate() { return views_delegate_.get(); }; |
| 39 ViewsTestHelper* views_test_helper() { return test_helper_.get(); } |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 scoped_ptr<TestViewsDelegate> views_delegate_; | 42 scoped_ptr<TestViewsDelegate> views_delegate_; |
| 42 scoped_ptr<ViewsTestHelper> test_helper_; | 43 scoped_ptr<ViewsTestHelper> test_helper_; |
| 43 scoped_ptr<PlatformTestHelper> platform_test_helper_; | 44 scoped_ptr<PlatformTestHelper> platform_test_helper_; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(ScopedViewsTestHelper); | 46 DISALLOW_COPY_AND_ASSIGN(ScopedViewsTestHelper); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 } // namespace views | 49 } // namespace views |
| 49 | 50 |
| 50 #endif // UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ | 51 #endif // UI_VIEWS_TEST_SCOPED_VIEWS_TEST_HELPER_H_ |
| OLD | NEW |