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/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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 ui::RemoteInputMethodPrivateWin* remote_input_method_private = | 383 ui::RemoteInputMethodPrivateWin* remote_input_method_private = |
384 GetRemoteInputMethodPrivate(); | 384 GetRemoteInputMethodPrivate(); |
385 if (remote_input_method_private) | 385 if (remote_input_method_private) |
386 remote_input_method_private->SetRemoteDelegate(this); | 386 remote_input_method_private->SetRemoteDelegate(this); |
387 } | 387 } |
388 | 388 |
389 void RemoteWindowTreeHostWin::Hide() { | 389 void RemoteWindowTreeHostWin::Hide() { |
390 NOTIMPLEMENTED(); | 390 NOTIMPLEMENTED(); |
391 } | 391 } |
392 | 392 |
393 void RemoteWindowTreeHostWin::ToggleFullScreen() { | |
394 } | |
395 | |
396 gfx::Rect RemoteWindowTreeHostWin::GetBounds() const { | 393 gfx::Rect RemoteWindowTreeHostWin::GetBounds() const { |
397 return gfx::Rect(window_size_); | 394 return gfx::Rect(window_size_); |
398 } | 395 } |
399 | 396 |
400 void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) { | 397 void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) { |
401 window_size_ = bounds.size(); | 398 window_size_ = bounds.size(); |
402 OnHostResized(bounds.size()); | 399 OnHostResized(bounds.size()); |
403 } | 400 } |
404 | 401 |
405 gfx::Insets RemoteWindowTreeHostWin::GetInsets() const { | |
406 return gfx::Insets(); | |
407 } | |
408 | |
409 void RemoteWindowTreeHostWin::SetInsets(const gfx::Insets& insets) { | |
410 } | |
411 | |
412 gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const { | 402 gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const { |
413 return gfx::Point(0, 0); | 403 return gfx::Point(0, 0); |
414 } | 404 } |
415 | 405 |
416 void RemoteWindowTreeHostWin::SetCapture() { | 406 void RemoteWindowTreeHostWin::SetCapture() { |
417 } | 407 } |
418 | 408 |
419 void RemoteWindowTreeHostWin::ReleaseCapture() { | 409 void RemoteWindowTreeHostWin::ReleaseCapture() { |
420 } | 410 } |
421 | 411 |
422 bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { | 412 bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { |
423 aura::client::CursorClient* cursor_client = | 413 aura::client::CursorClient* cursor_client = |
424 aura::client::GetCursorClient(window()); | 414 aura::client::GetCursorClient(window()); |
425 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { | 415 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { |
426 *location_return = gfx::Point(0, 0); | 416 *location_return = gfx::Point(0, 0); |
427 return false; | 417 return false; |
428 } | 418 } |
429 POINT pt; | 419 POINT pt; |
430 GetCursorPos(&pt); | 420 GetCursorPos(&pt); |
431 *location_return = | 421 *location_return = |
432 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y)); | 422 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y)); |
433 return true; | 423 return true; |
434 } | 424 } |
435 | 425 |
436 bool RemoteWindowTreeHostWin::ConfineCursorToRootWindow() { | |
437 return true; | |
438 } | |
439 | |
440 void RemoteWindowTreeHostWin::UnConfineCursor() { | |
441 } | |
442 | |
443 void RemoteWindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) { | 426 void RemoteWindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) { |
444 if (!host_) | 427 if (!host_) |
445 return; | 428 return; |
446 host_->Send( | 429 host_->Send( |
447 new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform()))); | 430 new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform()))); |
448 } | 431 } |
449 | 432 |
450 void RemoteWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) { | 433 void RemoteWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) { |
451 VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y(); | 434 VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y(); |
452 if (!host_) | 435 if (!host_) |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 748 } |
766 | 749 |
767 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 750 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
768 if (flags == event_flags_) | 751 if (flags == event_flags_) |
769 return; | 752 return; |
770 event_flags_ = flags; | 753 event_flags_ = flags; |
771 SetVirtualKeyStates(event_flags_); | 754 SetVirtualKeyStates(event_flags_); |
772 } | 755 } |
773 | 756 |
774 } // namespace aura | 757 } // namespace aura |
OLD | NEW |