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

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: Update Created 9 years, 6 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 GetTextInputClient()->ChangeTextDirectionAndLayoutAlignment( 61 GetTextInputClient()->ChangeTextDirectionAndLayoutAlignment(
62 pending_requested_direction_); 62 pending_requested_direction_);
63 pending_requested_direction_ = base::i18n::UNKNOWN_DIRECTION; 63 pending_requested_direction_ = base::i18n::UNKNOWN_DIRECTION;
64 } 64 }
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 InputMethodBase::TextInputTypeChanged();
71 if (IsViewFocused(view)) { 72 if (IsViewFocused(view)) {
72 ime_input_.CancelIME(hwnd()); 73 ime_input_.CancelIME(hwnd());
73 UpdateIMEState(); 74 UpdateIMEState();
74 } 75 }
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;
(...skipping 160 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

Powered by Google App Engine
This is Rietveld 408576698