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

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

Issue 2852763002: Added a system caret used for accessibility on Windows. (Closed)
Patch Set: Disabled all tests Created 3 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
« no previous file with comments | « ui/base/ime/input_method_observer.h ('k') | ui/views/accessibility/DEPS » ('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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <cwctype> 9 #include <cwctype>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 void InputMethodWin::OnTextInputTypeChanged(const TextInputClient* client) { 223 void InputMethodWin::OnTextInputTypeChanged(const TextInputClient* client) {
224 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) 224 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
225 return; 225 return;
226 imm32_manager_.CancelIME(toplevel_window_handle_); 226 imm32_manager_.CancelIME(toplevel_window_handle_);
227 UpdateIMEState(); 227 UpdateIMEState();
228 } 228 }
229 229
230 void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) { 230 void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) {
231 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client)) 231 if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
232 return; 232 return;
233 NotifyTextInputCaretBoundsChanged(client);
233 TextInputType text_input_type = GetTextInputType(); 234 TextInputType text_input_type = GetTextInputType();
234 if (client == GetTextInputClient() && 235 if (client == GetTextInputClient() &&
235 text_input_type != TEXT_INPUT_TYPE_NONE && 236 text_input_type != TEXT_INPUT_TYPE_NONE &&
236 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) { 237 text_input_type != TEXT_INPUT_TYPE_PASSWORD && GetEngine()) {
237 // |enabled_| == false could be faked, and the engine should rely on the 238 // |enabled_| == false could be faked, and the engine should rely on the
238 // real type from GetTextInputType(). 239 // real type from GetTextInputType().
239 GetEngine()->SetCompositionBounds(GetCompositionBounds(client)); 240 GetEngine()->SetCompositionBounds(GetCompositionBounds(client));
240 } 241 }
241 if (!enabled_) 242 if (!enabled_)
242 return; 243 return;
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 ui::IMEEngineHandlerInterface* engine = GetEngine(); 759 ui::IMEEngineHandlerInterface* engine = GetEngine();
759 if (engine) { 760 if (engine) {
760 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE) 761 if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE)
761 engine->FocusOut(); 762 engine->FocusOut();
762 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) 763 if (GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE)
763 engine->FocusIn(context); 764 engine->FocusIn(context);
764 } 765 }
765 } 766 }
766 767
767 } // namespace ui 768 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_observer.h ('k') | ui/views/accessibility/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698