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 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Simulate a OS-level destruction of the native widget held by |widget|. | 108 // Simulate a OS-level destruction of the native widget held by |widget|. |
109 static void SimulateNativeDestroy(Widget* widget); | 109 static void SimulateNativeDestroy(Widget* widget); |
110 | 110 |
111 // Return true if |window| is visible according to the native platform. | 111 // Return true if |window| is visible according to the native platform. |
112 static bool IsNativeWindowVisible(gfx::NativeWindow window); | 112 static bool IsNativeWindowVisible(gfx::NativeWindow window); |
113 | 113 |
114 // Return true if |above| is higher than |below| in the native window Z-order. | 114 // Return true if |above| is higher than |below| in the native window Z-order. |
115 // Both windows must be visible. | 115 // Both windows must be visible. |
116 static bool IsWindowStackedAbove(Widget* above, Widget* below); | 116 static bool IsWindowStackedAbove(Widget* above, Widget* below); |
117 | 117 |
| 118 // Query the native window system for the minimum size configured for user |
| 119 // initiated window resizes. |
| 120 static gfx::Size GetNativeWidgetMinimumContentSize(Widget* widget); |
| 121 |
118 // Return the event processor for |widget|. On aura platforms, this is an | 122 // Return the event processor for |widget|. On aura platforms, this is an |
119 // aura::WindowEventDispatcher. Otherwise, it is a bridge to the OS event | 123 // aura::WindowEventDispatcher. Otherwise, it is a bridge to the OS event |
120 // processor. | 124 // processor. |
121 static ui::EventProcessor* GetEventProcessor(Widget* widget); | 125 static ui::EventProcessor* GetEventProcessor(Widget* widget); |
122 | 126 |
123 #if defined(OS_MACOSX) | 127 #if defined(OS_MACOSX) |
124 static scoped_ptr<FakeActivation> FakeWidgetIsActiveAlways(); | 128 static scoped_ptr<FakeActivation> FakeWidgetIsActiveAlways(); |
125 #endif | 129 #endif |
126 | 130 |
127 private: | 131 private: |
128 DISALLOW_COPY_AND_ASSIGN(WidgetTest); | 132 DISALLOW_COPY_AND_ASSIGN(WidgetTest); |
129 }; | 133 }; |
130 | 134 |
131 } // namespace test | 135 } // namespace test |
132 } // namespace views | 136 } // namespace views |
133 | 137 |
134 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ | 138 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ |
OLD | NEW |