OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WIDGET_TEST_H_ | 5 #ifndef UI_VIEWS_TEST_WIDGET_TEST_H_ |
6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ | 6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 #include "ui/views/test/views_test_base.h" | 9 #include "ui/views/test/views_test_base.h" |
10 | 10 |
11 #if defined(USE_AURA) | 11 #if defined(USE_AURA) |
12 #include "ui/views/widget/native_widget_aura.h" | 12 #include "ui/views/widget/native_widget_aura.h" |
13 #if !defined(OS_CHROMEOS) | 13 #if !defined(OS_CHROMEOS) |
14 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 14 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
15 #endif | 15 #endif |
16 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
17 #include "ui/views/widget/native_widget_mac.h" | 17 #include "ui/views/widget/native_widget_mac.h" |
18 #endif | 18 #endif |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
| 21 namespace internal { |
| 22 class InputMethodDelegate; |
| 23 } |
21 class EventProcessor; | 24 class EventProcessor; |
22 } | 25 } |
23 | 26 |
24 namespace views { | 27 namespace views { |
25 | 28 |
26 class NativeWidget; | 29 class NativeWidget; |
27 class Widget; | 30 class Widget; |
28 | 31 |
29 #if defined(USE_AURA) | 32 #if defined(USE_AURA) |
30 typedef NativeWidgetAura PlatformNativeWidget; | 33 typedef NativeWidgetAura PlatformNativeWidget; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 126 |
124 // Query the native window system for the minimum size configured for user | 127 // Query the native window system for the minimum size configured for user |
125 // initiated window resizes. | 128 // initiated window resizes. |
126 static gfx::Size GetNativeWidgetMinimumContentSize(Widget* widget); | 129 static gfx::Size GetNativeWidgetMinimumContentSize(Widget* widget); |
127 | 130 |
128 // Return the event processor for |widget|. On aura platforms, this is an | 131 // Return the event processor for |widget|. On aura platforms, this is an |
129 // aura::WindowEventDispatcher. Otherwise, it is a bridge to the OS event | 132 // aura::WindowEventDispatcher. Otherwise, it is a bridge to the OS event |
130 // processor. | 133 // processor. |
131 static ui::EventProcessor* GetEventProcessor(Widget* widget); | 134 static ui::EventProcessor* GetEventProcessor(Widget* widget); |
132 | 135 |
| 136 // Get the InputMethodDelegate, for setting on a Mock InputMethod in tests. |
| 137 static ui::internal::InputMethodDelegate* GetInputMethodDelegateForWidget( |
| 138 Widget* widget); |
| 139 |
133 #if defined(OS_MACOSX) | 140 #if defined(OS_MACOSX) |
134 static scoped_ptr<FakeActivation> FakeWidgetIsActiveAlways(); | 141 static scoped_ptr<FakeActivation> FakeWidgetIsActiveAlways(); |
135 #endif | 142 #endif |
136 | 143 |
137 private: | 144 private: |
138 DISALLOW_COPY_AND_ASSIGN(WidgetTest); | 145 DISALLOW_COPY_AND_ASSIGN(WidgetTest); |
139 }; | 146 }; |
140 | 147 |
141 } // namespace test | 148 } // namespace test |
142 } // namespace views | 149 } // namespace views |
143 | 150 |
144 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ | 151 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ |
OLD | NEW |