| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/window_tree_host_win.h" | 5 #include "ui/aura/window_tree_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 | 164 |
| 165 void WindowTreeHostWin::ReleaseCapture() { | 165 void WindowTreeHostWin::ReleaseCapture() { |
| 166 if (has_capture_) { | 166 if (has_capture_) { |
| 167 has_capture_ = false; | 167 has_capture_ = false; |
| 168 ::ReleaseCapture(); | 168 ::ReleaseCapture(); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { | 172 bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { |
| 173 client::CursorClient* cursor_client = | 173 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 174 client::GetCursorClient(GetDispatcher()->window()); | |
| 175 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { | 174 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { |
| 176 *location_return = gfx::Point(0, 0); | 175 *location_return = gfx::Point(0, 0); |
| 177 return false; | 176 return false; |
| 178 } | 177 } |
| 179 | 178 |
| 180 POINT pt; | 179 POINT pt; |
| 181 GetCursorPos(&pt); | 180 GetCursorPos(&pt); |
| 182 ScreenToClient(hwnd(), &pt); | 181 ScreenToClient(hwnd(), &pt); |
| 183 const gfx::Size size = GetBounds().size(); | 182 const gfx::Size size = GetBounds().size(); |
| 184 *location_return = | 183 *location_return = |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 namespace test { | 305 namespace test { |
| 307 | 306 |
| 308 // static | 307 // static |
| 309 void SetUsePopupAsRootWindowForTest(bool use) { | 308 void SetUsePopupAsRootWindowForTest(bool use) { |
| 310 use_popup_as_root_window_for_test = use; | 309 use_popup_as_root_window_for_test = use; |
| 311 } | 310 } |
| 312 | 311 |
| 313 } // namespace test | 312 } // namespace test |
| 314 | 313 |
| 315 } // namespace aura | 314 } // namespace aura |
| OLD | NEW |