diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 14:42:55 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 14:42:55 +0000 |
commit | dc645d501fcfda65846eab80213df828f2d4e56e (patch) | |
tree | 9be73c749fe3bed6e3b97286737c36f3f185353b /ui/aura/window_tree_host_win.cc | |
parent | 3ecf6982c562085d64b9367f684e7eb21b5290bc (diff) | |
download | chromium_src-dc645d501fcfda65846eab80213df828f2d4e56e.zip chromium_src-dc645d501fcfda65846eab80213df828f2d4e56e.tar.gz chromium_src-dc645d501fcfda65846eab80213df828f2d4e56e.tar.bz2 |
aura: Remove WindowTreeHost::QueryMouseLocation().
The primary use-case for QueryMouseLocation() is for X11 interactive
tests. The only other use was in WindowEventDispatcher, but that code
is no longer necessary.
BUG=none
R=sky@chromium.org
Review URL: https://codereview.chromium.org/251743004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_win.cc')
-rw-r--r-- | ui/aura/window_tree_host_win.cc | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc index 9bbb44b..adf56e9 100644 --- a/ui/aura/window_tree_host_win.cc +++ b/ui/aura/window_tree_host_win.cc @@ -126,24 +126,6 @@ void WindowTreeHostWin::ReleaseCapture() { } } -bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { - client::CursorClient* cursor_client = client::GetCursorClient(window()); - if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { - *location_return = gfx::Point(0, 0); - return false; - } - - POINT pt; - GetCursorPos(&pt); - ScreenToClient(hwnd(), &pt); - const gfx::Size size = GetBounds().size(); - *location_return = - gfx::Point(max(0, min(size.width(), static_cast<int>(pt.x))), - max(0, min(size.height(), static_cast<int>(pt.y)))); - return (pt.x >= 0 && static_cast<int>(pt.x) < size.width() && - pt.y >= 0 && static_cast<int>(pt.y) < size.height()); -} - void WindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) { // Custom web cursors are handled directly. if (native_cursor == ui::kCursorCustom) |