Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/views/test/widget_test.h" | |
| 6 | |
| 7 #include <Cocoa/Cocoa.h> | |
| 8 | |
| 9 #include "ui/views/widget/root_view.h" | |
| 10 | |
| 11 namespace views { | |
| 12 namespace test { | |
| 13 | |
| 14 // static | |
| 15 void WidgetTest::SimulateNativeDestroy(Widget* widget) { | |
| 16 [widget->GetNativeWindow() release]; | |
|
Robert Sesek
2014/06/18 15:20:46
Close the window before destroying it?
tapted
2014/06/19 02:00:13
Done. yep - the test will need to see the notifica
| |
| 17 } | |
| 18 | |
| 19 // static | |
| 20 bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { | |
| 21 return [window isVisible]; | |
| 22 } | |
| 23 | |
| 24 // static | |
| 25 ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { | |
| 26 return static_cast<internal::RootView*>(widget->GetRootView()); | |
| 27 } | |
| 28 | |
| 29 } // namespace test | |
| 30 } // namespace views | |
| OLD | NEW |