1 // Copyright 2012 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.
5 #include "ui/aura/test/window_test_api.h"
7 #include "ui/aura/window.h"
8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/aura/window_tree_host.h"
14 WindowTestApi::WindowTestApi(Window
* window
) : window_(window
) {
17 bool WindowTestApi::OwnsLayer() const {
18 return window_
->OwnsLayer();
21 bool WindowTestApi::ContainsMouse() const {
22 if (!window_
->IsVisible())
24 WindowTreeHost
* host
= window_
->GetHost();
26 window_
->ContainsPointInRoot(
27 host
->dispatcher()->GetLastMouseLocationInRoot());