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

Side by Side Diff: views/ime/input_method_win.cc

Issue 7217008: Use input method to control visibility of virtual keyboard (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase Created 9 years, 5 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
« no previous file with comments | « views/ime/input_method_ibus.cc ('k') | views/ime/text_input_type_tracker.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/ime/input_method_win.h" 5 #include "views/ime/input_method_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 DispatchKeyEventPostIME(key); 67 DispatchKeyEventPostIME(key);
68 } 68 }
69 69
70 void InputMethodWin::OnTextInputTypeChanged(View* view) { 70 void InputMethodWin::OnTextInputTypeChanged(View* view) {
71 if (IsViewFocused(view)) { 71 if (IsViewFocused(view)) {
72 ime_input_.CancelIME(hwnd()); 72 ime_input_.CancelIME(hwnd());
73 UpdateIMEState(); 73 UpdateIMEState();
74 } 74 }
75 InputMethodBase::OnTextInputTypeChanged(view);
75 } 76 }
76 77
77 void InputMethodWin::OnCaretBoundsChanged(View* view) { 78 void InputMethodWin::OnCaretBoundsChanged(View* view) {
78 gfx::Rect rect; 79 gfx::Rect rect;
79 if (!IsViewFocused(view) || !GetCaretBoundsInWidget(&rect)) 80 if (!IsViewFocused(view) || !GetCaretBoundsInWidget(&rect))
80 return; 81 return;
81 ime_input_.UpdateCaretRect(hwnd(), rect); 82 ime_input_.UpdateCaretRect(hwnd(), rect);
82 } 83 }
83 84
84 void InputMethodWin::CancelComposition(View* view) { 85 void InputMethodWin::CancelComposition(View* view) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 case ui::TEXT_INPUT_TYPE_PASSWORD: 242 case ui::TEXT_INPUT_TYPE_PASSWORD:
242 ime_input_.DisableIME(hwnd()); 243 ime_input_.DisableIME(hwnd());
243 break; 244 break;
244 default: 245 default:
245 ime_input_.EnableIME(hwnd()); 246 ime_input_.EnableIME(hwnd());
246 break; 247 break;
247 } 248 }
248 } 249 }
249 250
250 } // namespace views 251 } // namespace views
OLDNEW
« no previous file with comments | « views/ime/input_method_ibus.cc ('k') | views/ime/text_input_type_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698