| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 "ash/mus/test/wm_test_screen.h" | |
| 6 | |
| 7 #include "ui/aura/window.h" | |
| 8 #include "ui/display/display_finder.h" | |
| 9 | |
| 10 namespace ash { | |
| 11 namespace mus { | |
| 12 | |
| 13 WmTestScreen::WmTestScreen() {} | |
| 14 WmTestScreen::~WmTestScreen() {} | |
| 15 | |
| 16 gfx::Point WmTestScreen::GetCursorScreenPoint() { | |
| 17 // TODO(sky): use the implementation from WindowManagerConnection. | |
| 18 DVLOG(1) << "NOTIMPLEMENTED"; | |
| 19 return gfx::Point(); | |
| 20 } | |
| 21 | |
| 22 bool WmTestScreen::IsWindowUnderCursor(gfx::NativeWindow window) { | |
| 23 if (!window) | |
| 24 return false; | |
| 25 | |
| 26 return window->IsVisible() && | |
| 27 window->GetBoundsInScreen().Contains(GetCursorScreenPoint()); | |
| 28 } | |
| 29 | |
| 30 } // namespace mus | |
| 31 } // namespace ash | |
| OLD | NEW |