Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: ui/aura/remote_window_tree_host_win.cc

Issue 251743004: aura: Remove WindowTreeHost::QueryMouseLocation(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/remote_window_tree_host_win.h" 5 #include "ui/aura/remote_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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const { 407 gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const {
408 return gfx::Point(0, 0); 408 return gfx::Point(0, 0);
409 } 409 }
410 410
411 void RemoteWindowTreeHostWin::SetCapture() { 411 void RemoteWindowTreeHostWin::SetCapture() {
412 } 412 }
413 413
414 void RemoteWindowTreeHostWin::ReleaseCapture() { 414 void RemoteWindowTreeHostWin::ReleaseCapture() {
415 } 415 }
416 416
417 bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
418 aura::client::CursorClient* cursor_client =
419 aura::client::GetCursorClient(window());
420 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
421 *location_return = gfx::Point(0, 0);
422 return false;
423 }
424 POINT pt;
425 GetCursorPos(&pt);
426 *location_return =
427 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y));
428 return true;
429 }
430
431 void RemoteWindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) { 417 void RemoteWindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) {
432 if (!host_) 418 if (!host_)
433 return; 419 return;
434 host_->Send( 420 host_->Send(
435 new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform()))); 421 new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform())));
436 } 422 }
437 423
438 void RemoteWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) { 424 void RemoteWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) {
439 VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y(); 425 VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y();
440 if (!host_) 426 if (!host_)
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 739 }
754 740
755 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { 741 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) {
756 if (flags == event_flags_) 742 if (flags == event_flags_)
757 return; 743 return;
758 event_flags_ = flags; 744 event_flags_ = flags;
759 SetVirtualKeyStates(event_flags_); 745 SetVirtualKeyStates(event_flags_);
760 } 746 }
761 747
762 } // namespace aura 748 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698