| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // the SetCursor operation completed. | 264 // the SetCursor operation completed. |
| 265 ignore_mouse_moves_until_set_cursor_ack_++; | 265 ignore_mouse_moves_until_set_cursor_ack_++; |
| 266 VLOG(1) << "In MoveCursorTo. Sending IPC"; | 266 VLOG(1) << "In MoveCursorTo. Sending IPC"; |
| 267 host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y())); | 267 host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y())); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void RemoteWindowTreeHostWin::OnCursorVisibilityChangedNative(bool show) { | 270 void RemoteWindowTreeHostWin::OnCursorVisibilityChangedNative(bool show) { |
| 271 NOTIMPLEMENTED(); | 271 NOTIMPLEMENTED(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 ui::EventProcessor* RemoteWindowTreeHostWin::GetEventProcessor() { | |
| 275 return dispatcher(); | |
| 276 } | |
| 277 | |
| 278 void RemoteWindowTreeHostWin::CancelComposition() { | 274 void RemoteWindowTreeHostWin::CancelComposition() { |
| 279 if (!host_) | 275 if (!host_) |
| 280 return; | 276 return; |
| 281 host_->Send(new MetroViewerHostMsg_ImeCancelComposition); | 277 host_->Send(new MetroViewerHostMsg_ImeCancelComposition); |
| 282 } | 278 } |
| 283 | 279 |
| 284 void RemoteWindowTreeHostWin::OnTextInputClientUpdated( | 280 void RemoteWindowTreeHostWin::OnTextInputClientUpdated( |
| 285 const std::vector<int32>& input_scopes, | 281 const std::vector<int32>& input_scopes, |
| 286 const std::vector<gfx::Rect>& composition_character_bounds) { | 282 const std::vector<gfx::Rect>& composition_character_bounds) { |
| 287 if (!host_) | 283 if (!host_) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 SendEventToProcessor(&event); | 422 SendEventToProcessor(&event); |
| 427 } | 423 } |
| 428 | 424 |
| 429 void RemoteWindowTreeHostWin::OnSetCursorPosAck() { | 425 void RemoteWindowTreeHostWin::OnSetCursorPosAck() { |
| 430 DCHECK_GT(ignore_mouse_moves_until_set_cursor_ack_, 0); | 426 DCHECK_GT(ignore_mouse_moves_until_set_cursor_ack_, 0); |
| 431 ignore_mouse_moves_until_set_cursor_ack_--; | 427 ignore_mouse_moves_until_set_cursor_ack_--; |
| 432 } | 428 } |
| 433 | 429 |
| 434 ui::RemoteInputMethodPrivateWin* | 430 ui::RemoteInputMethodPrivateWin* |
| 435 RemoteWindowTreeHostWin::GetRemoteInputMethodPrivate() { | 431 RemoteWindowTreeHostWin::GetRemoteInputMethodPrivate() { |
| 436 ui::InputMethod* input_method = GetAshWindow()->GetProperty( | 432 ui::InputMethod* input_method = GetAshWindow()->GetHost()->GetInputMethod(); |
| 437 aura::client::kRootWindowInputMethodKey); | |
| 438 return ui::RemoteInputMethodPrivateWin::Get(input_method); | 433 return ui::RemoteInputMethodPrivateWin::Get(input_method); |
| 439 } | 434 } |
| 440 | 435 |
| 441 void RemoteWindowTreeHostWin::OnImeCandidatePopupChanged(bool visible) { | 436 void RemoteWindowTreeHostWin::OnImeCandidatePopupChanged(bool visible) { |
| 442 ui::RemoteInputMethodPrivateWin* remote_input_method_private = | 437 ui::RemoteInputMethodPrivateWin* remote_input_method_private = |
| 443 GetRemoteInputMethodPrivate(); | 438 GetRemoteInputMethodPrivate(); |
| 444 if (!remote_input_method_private) | 439 if (!remote_input_method_private) |
| 445 return; | 440 return; |
| 446 remote_input_method_private->OnCandidatePopupChanged(visible); | 441 remote_input_method_private->OnCandidatePopupChanged(visible); |
| 447 } | 442 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 } | 507 } |
| 513 | 508 |
| 514 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 509 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
| 515 if (flags == event_flags_) | 510 if (flags == event_flags_) |
| 516 return; | 511 return; |
| 517 event_flags_ = flags; | 512 event_flags_ = flags; |
| 518 SetVirtualKeyStates(event_flags_); | 513 SetVirtualKeyStates(event_flags_); |
| 519 } | 514 } |
| 520 | 515 |
| 521 } // namespace aura | 516 } // namespace aura |
| OLD | NEW |