Remove ExtensionPrefs::SetDidExtensionEscalatePermissions.
[chromium-blink-merge.git] / ui / aura / test / window_test_api.cc
blob86b3370b1126ddfa27973e22af16987e7f574f8b
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"
11 namespace aura {
12 namespace test {
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())
23 return false;
24 WindowTreeHost* host = window_->GetHost();
25 return host &&
26 window_->ContainsPointInRoot(
27 host->dispatcher()->GetLastMouseLocationInRoot());
30 } // namespace test
31 } // namespace aura