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

Side by Side Diff: ui/base/ime/input_method_win.cc

Issue 660173002: Type conversion fixes, ui/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « ui/base/clipboard/clipboard_win.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/ime/input_method_win.h" 5 #include "ui/base/ime/input_method_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ui/base/ime/text_input_client.h" 8 #include "ui/base/ime/text_input_client.h"
9 #include "ui/base/ime/win/tsf_input_scope.h" 9 #include "ui/base/ime/win/tsf_input_scope.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // window. So we can safely assume that |attached_window_handle| is ready for 562 // window. So we can safely assume that |attached_window_handle| is ready for
563 // receiving keyboard input as long as it is an active window. This works well 563 // receiving keyboard input as long as it is an active window. This works well
564 // even when the |attached_window_handle| becomes active but has not received 564 // even when the |attached_window_handle| becomes active but has not received
565 // WM_FOCUS yet. 565 // WM_FOCUS yet.
566 return attached_window_handle && GetActiveWindow() == attached_window_handle; 566 return attached_window_handle && GetActiveWindow() == attached_window_handle;
567 } 567 }
568 568
569 bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) { 569 bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) {
570 if (event.is_char()) { 570 if (event.is_char()) {
571 if (GetTextInputClient()) { 571 if (GetTextInputClient()) {
572 GetTextInputClient()->InsertChar(event.key_code(), 572 GetTextInputClient()->InsertChar(
573 ui::GetModifiersFromKeyState()); 573 static_cast<base::char16>(event.key_code()),
574 ui::GetModifiersFromKeyState());
574 return true; 575 return true;
575 } 576 }
576 } 577 }
577 return DispatchKeyEventPostIME(event); 578 return DispatchKeyEventPostIME(event);
578 } 579 }
579 580
580 void InputMethodWin::ConfirmCompositionText() { 581 void InputMethodWin::ConfirmCompositionText() {
581 if (composing_window_handle_) 582 if (composing_window_handle_)
582 imm32_manager_.CleanupComposition(composing_window_handle_); 583 imm32_manager_.CleanupComposition(composing_window_handle_);
583 584
(...skipping 23 matching lines...) Expand all
607 enabled_ = true; 608 enabled_ = true;
608 break; 609 break;
609 } 610 }
610 611
611 imm32_manager_.SetTextInputMode(window_handle, text_input_mode); 612 imm32_manager_.SetTextInputMode(window_handle, text_input_mode);
612 tsf_inputscope::SetInputScopeForTsfUnawareWindow( 613 tsf_inputscope::SetInputScopeForTsfUnawareWindow(
613 window_handle, text_input_type, text_input_mode); 614 window_handle, text_input_type, text_input_mode);
614 } 615 }
615 616
616 } // namespace ui 617 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_win.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698