16d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 26d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 36d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// found in the LICENSE file. 46d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 56d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)#include "ui/views/test/widget_test.h" 66d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 76d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)#include "ui/aura/window.h" 86d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)#include "ui/aura/window_tree_host.h" 96d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)#include "ui/views/widget/widget.h" 106d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 116d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)namespace views { 126d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)namespace test { 136d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 146d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// static 156d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)void WidgetTest::SimulateNativeDestroy(Widget* widget) { 166d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) delete widget->GetNativeView(); 176d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)} 186d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 196d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// static 206d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { 216d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) return window->IsVisible(); 226d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)} 236d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 246d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)// static 256d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { 266d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) return widget->GetNativeWindow()->GetHost()->event_processor(); 276d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)} 286d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) 296d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)} // namespace test 306d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)} // namespace views 31