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 <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
8 | 8 |
9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
10 #include "ui/views/widget/root_view.h" | 10 #include "ui/views/widget/root_view.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // static | 24 // static |
25 bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { | 25 bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { |
26 return [window isVisible]; | 26 return [window isVisible]; |
27 } | 27 } |
28 | 28 |
29 // static | 29 // static |
30 ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { | 30 ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { |
31 return static_cast<internal::RootView*>(widget->GetRootView()); | 31 return static_cast<internal::RootView*>(widget->GetRootView()); |
32 } | 32 } |
33 | 33 |
| 34 // static |
| 35 gfx::NativeWindow WidgetTest::CurrentlyFocussedWindow(Widget* widget_context) { |
| 36 return [[NSApplication sharedApplication] keyWindow]; |
| 37 } |
| 38 |
34 } // namespace test | 39 } // namespace test |
35 } // namespace views | 40 } // namespace views |
OLD | NEW |