| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void RemoteWindowTreeHostWin::HandleWindowSizeChanged(uint32 width, | 362 void RemoteWindowTreeHostWin::HandleWindowSizeChanged(uint32 width, |
| 363 uint32 height) { | 363 uint32 height) { |
| 364 SetBounds(gfx::Rect(0, 0, width, height)); | 364 SetBounds(gfx::Rect(0, 0, width, height)); |
| 365 } | 365 } |
| 366 | 366 |
| 367 bool RemoteWindowTreeHostWin::IsForegroundWindow() { | 367 bool RemoteWindowTreeHostWin::IsForegroundWindow() { |
| 368 return ::GetForegroundWindow() == remote_window_; | 368 return ::GetForegroundWindow() == remote_window_; |
| 369 } | 369 } |
| 370 | 370 |
| 371 Window* RemoteWindowTreeHostWin::GetAshWindow() { | 371 Window* RemoteWindowTreeHostWin::GetAshWindow() { |
| 372 return GetDispatcher()->window(); | 372 return window(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 gfx::AcceleratedWidget RemoteWindowTreeHostWin::GetAcceleratedWidget() { | 375 gfx::AcceleratedWidget RemoteWindowTreeHostWin::GetAcceleratedWidget() { |
| 376 if (remote_window_) | 376 if (remote_window_) |
| 377 return remote_window_; | 377 return remote_window_; |
| 378 // Getting here should only happen for ash_unittests.exe and related code. | 378 // Getting here should only happen for ash_unittests.exe and related code. |
| 379 return ::GetDesktopWindow(); | 379 return ::GetDesktopWindow(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void RemoteWindowTreeHostWin::Show() { | 382 void RemoteWindowTreeHostWin::Show() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 414 } |
| 415 | 415 |
| 416 void RemoteWindowTreeHostWin::SetCapture() { | 416 void RemoteWindowTreeHostWin::SetCapture() { |
| 417 } | 417 } |
| 418 | 418 |
| 419 void RemoteWindowTreeHostWin::ReleaseCapture() { | 419 void RemoteWindowTreeHostWin::ReleaseCapture() { |
| 420 } | 420 } |
| 421 | 421 |
| 422 bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { | 422 bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { |
| 423 aura::client::CursorClient* cursor_client = | 423 aura::client::CursorClient* cursor_client = |
| 424 aura::client::GetCursorClient(GetDispatcher()->window()); | 424 aura::client::GetCursorClient(window()); |
| 425 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { | 425 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { |
| 426 *location_return = gfx::Point(0, 0); | 426 *location_return = gfx::Point(0, 0); |
| 427 return false; | 427 return false; |
| 428 } | 428 } |
| 429 POINT pt; | 429 POINT pt; |
| 430 GetCursorPos(&pt); | 430 GetCursorPos(&pt); |
| 431 *location_return = | 431 *location_return = |
| 432 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y)); | 432 gfx::Point(static_cast<int>(pt.x), static_cast<int>(pt.y)); |
| 433 return true; | 433 return true; |
| 434 } | 434 } |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 | 769 |
| 770 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 770 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
| 771 if (flags == event_flags_) | 771 if (flags == event_flags_) |
| 772 return; | 772 return; |
| 773 event_flags_ = flags; | 773 event_flags_ = flags; |
| 774 SetVirtualKeyStates(event_flags_); | 774 SetVirtualKeyStates(event_flags_); |
| 775 } | 775 } |
| 776 | 776 |
| 777 } // namespace aura | 777 } // namespace aura |
| OLD | NEW |