| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/views/test/widget_test.h" | 5 #include "ui/views/test/widget_test.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "ui/aura/client/focus_client.h" | 8 #include "ui/aura/client/focus_client.h" |
| 9 #include "ui/aura/mus/window_tree_client.h" | 9 #include "ui/aura/mus/window_tree_client.h" |
| 10 #include "ui/aura/test/aura_test_helper.h" | 10 #include "ui/aura/test/aura_test_helper.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget(), &hints, | 139 widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget(), &hints, |
| 140 &supplied_return); | 140 &supplied_return); |
| 141 return gfx::Size(hints.min_width, hints.min_height); | 141 return gfx::Size(hints.min_width, hints.min_height); |
| 142 #else | 142 #else |
| 143 NOTREACHED(); | 143 NOTREACHED(); |
| 144 return gfx::Size(); | 144 return gfx::Size(); |
| 145 #endif | 145 #endif |
| 146 } | 146 } |
| 147 | 147 |
| 148 // static | 148 // static |
| 149 ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { | 149 ui::EventSink* WidgetTest::GetEventSink(Widget* widget) { |
| 150 return widget->GetNativeWindow()->GetHost()->event_processor(); | 150 return widget->GetNativeWindow()->GetHost()->event_sink(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // static | 153 // static |
| 154 ui::internal::InputMethodDelegate* WidgetTest::GetInputMethodDelegateForWidget( | 154 ui::internal::InputMethodDelegate* WidgetTest::GetInputMethodDelegateForWidget( |
| 155 Widget* widget) { | 155 Widget* widget) { |
| 156 return widget->GetNativeWindow()->GetRootWindow()->GetHost(); | 156 return widget->GetNativeWindow()->GetRootWindow()->GetHost(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 // static | 159 // static |
| 160 bool WidgetTest::IsNativeWindowTransparent(gfx::NativeWindow window) { | 160 bool WidgetTest::IsNativeWindowTransparent(gfx::NativeWindow window) { |
| 161 return window->transparent(); | 161 return window->transparent(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 // static | 164 // static |
| 165 Widget::Widgets WidgetTest::GetAllWidgets() { | 165 Widget::Widgets WidgetTest::GetAllWidgets() { |
| 166 Widget::Widgets all_widgets; | 166 Widget::Widgets all_widgets; |
| 167 for (aura::Window* window : GetAllTopLevelWindows()) | 167 for (aura::Window* window : GetAllTopLevelWindows()) |
| 168 Widget::GetAllChildWidgets(window->GetRootWindow(), &all_widgets); | 168 Widget::GetAllChildWidgets(window->GetRootWindow(), &all_widgets); |
| 169 return all_widgets; | 169 return all_widgets; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace test | 172 } // namespace test |
| 173 } // namespace views | 173 } // namespace views |
| OLD | NEW |