OLD | NEW |
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 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 DCHECK(!setup_called_); | 60 DCHECK(!setup_called_); |
61 views_delegate_for_setup_.swap(views_delegate); | 61 views_delegate_for_setup_.swap(views_delegate); |
62 } | 62 } |
63 | 63 |
64 base::MessageLoopForUI* message_loop() { return &message_loop_; } | 64 base::MessageLoopForUI* message_loop() { return &message_loop_; } |
65 | 65 |
66 // Returns a context view. In aura builds, this will be the | 66 // Returns a context view. In aura builds, this will be the |
67 // RootWindow. Everywhere else, NULL. | 67 // RootWindow. Everywhere else, NULL. |
68 gfx::NativeWindow GetContext(); | 68 gfx::NativeWindow GetContext(); |
69 | 69 |
| 70 // Sets the full keyboard access state. Note this is only used on Mac. |
| 71 void SetFullKeyboardAccessState(Widget* widget, bool new_state); |
| 72 |
70 private: | 73 private: |
71 base::MessageLoopForUI message_loop_; | 74 base::MessageLoopForUI message_loop_; |
72 std::unique_ptr<TestViewsDelegate> views_delegate_for_setup_; | 75 std::unique_ptr<TestViewsDelegate> views_delegate_for_setup_; |
73 std::unique_ptr<ScopedViewsTestHelper> test_helper_; | 76 std::unique_ptr<ScopedViewsTestHelper> test_helper_; |
74 bool setup_called_; | 77 bool setup_called_; |
75 bool teardown_called_; | 78 bool teardown_called_; |
76 bool has_compositing_manager_; | 79 bool has_compositing_manager_; |
77 | 80 |
78 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
79 ui::ScopedOleInitializer ole_initializer_; | 82 ui::ScopedOleInitializer ole_initializer_; |
80 #endif | 83 #endif |
81 | 84 |
82 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); | 85 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); |
83 }; | 86 }; |
84 | 87 |
85 } // namespace views | 88 } // namespace views |
86 | 89 |
87 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ | 90 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ |
OLD | NEW |