OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/shell/browser/shell_screen.h" | 5 #include "extensions/shell/browser/shell_screen.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 gfx::Point ShellScreen::GetCursorScreenPoint() { | 67 gfx::Point ShellScreen::GetCursorScreenPoint() { |
68 return aura::Env::GetInstance()->last_mouse_location(); | 68 return aura::Env::GetInstance()->last_mouse_location(); |
69 } | 69 } |
70 | 70 |
71 bool ShellScreen::IsWindowUnderCursor(gfx::NativeWindow window) { | 71 bool ShellScreen::IsWindowUnderCursor(gfx::NativeWindow window) { |
72 return GetWindowAtScreenPoint(GetCursorScreenPoint()) == window; | 72 return GetWindowAtScreenPoint(GetCursorScreenPoint()) == window; |
73 } | 73 } |
74 | 74 |
75 gfx::NativeWindow ShellScreen::GetWindowAtScreenPoint(const gfx::Point& point) { | 75 gfx::NativeWindow ShellScreen::GetWindowAtScreenPoint(const gfx::Point& point) { |
76 return host_->window()->GetTopWindowContainingPoint(point); | 76 return host_->window()->GetEventHandlerForPoint(point); |
77 } | 77 } |
78 | 78 |
79 display::Display ShellScreen::GetDisplayNearestWindow( | 79 display::Display ShellScreen::GetDisplayNearestWindow( |
80 gfx::NativeWindow window) const { | 80 gfx::NativeWindow window) const { |
81 return GetPrimaryDisplay(); | 81 return GetPrimaryDisplay(); |
82 } | 82 } |
83 | 83 |
84 } // namespace extensions | 84 } // namespace extensions |
OLD | NEW |