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

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

Issue 2781613003: Added a class acting as a fake caret for accessibility. (Closed)
Patch Set: Added code that handles views. Created 3 years, 7 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <cwctype> 9 #include <cwctype>
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void InputMethodWin::OnTextInputTypeChanged(const TextInputClient* client) { 218 void InputMethodWin::OnTextInputTypeChanged(const TextInputClient* client) {
219 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) 219 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
220 return; 220 return;
221 imm32_manager_.CancelIME(toplevel_window_handle_); 221 imm32_manager_.CancelIME(toplevel_window_handle_);
222 UpdateIMEState(); 222 UpdateIMEState();
223 } 223 }
224 224
225 void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) { 225 void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) {
226 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) 226 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
227 return; 227 return;
228 NotifyTextInputCaretBoundsChanged(client);
228 TextInputType text_input_type = GetTextInputType(); 229 TextInputType text_input_type = GetTextInputType();
229 if (client == GetTextInputClient() && 230 if (client == GetTextInputClient() &&
230 text_input_type != TEXT_INPUT_TYPE_NONE && 231 text_input_type != TEXT_INPUT_TYPE_NONE &&
231 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) { 232 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) {
232 // |enabled_| == false could be faked, and the engine should rely on the 233 // |enabled_| == false could be faked, and the engine should rely on the
233 // real type from GetTextInputType(). 234 // real type from GetTextInputType().
234 GetEngine()->SetCompositionBounds(GetCompositionBounds(client)); 235 GetEngine()->SetCompositionBounds(GetCompositionBounds(client));
235 } 236 }
236 if (!enabled_) 237 if (!enabled_)
237 return; 238 return;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 ui::IMEEngineHandlerInterface* engine = GetEngine(); 752 ui::IMEEngineHandlerInterface* engine = GetEngine();
752 if (engine) { 753 if (engine) {
753 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE) 754 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE)
754 engine->FocusOut(); 755 engine->FocusOut();
755 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) 756 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE)
756 engine->FocusIn(context); 757 engine->FocusIn(context);
757 } 758 }
758 } 759 }
759 760
760 } // namespace ui 761 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698