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

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

Issue 1160433006: Notify InputMethodBase on TextInputState change to send InputMethodObserver::OnTextInputStateChange… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_auralinux.h" 5 #include "ui/base/ime/input_method_auralinux.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "ui/base/ime/linux/linux_input_method_context_factory.h" 9 #include "ui/base/ime/linux/linux_input_method_context_factory.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // ui::TEXT_INPUT_TYPE_NONE. 147 // ui::TEXT_INPUT_TYPE_NONE.
148 if (GetTextInputClient()) 148 if (GetTextInputClient())
149 context_simple_->Focus(); 149 context_simple_->Focus();
150 else 150 else
151 context_simple_->Blur(); 151 context_simple_->Blur();
152 } 152 }
153 153
154 void InputMethodAuraLinux::OnTextInputTypeChanged( 154 void InputMethodAuraLinux::OnTextInputTypeChanged(
155 const TextInputClient* client) { 155 const TextInputClient* client) {
156 UpdateContextFocusState(); 156 UpdateContextFocusState();
157 InputMethodBase::OnTextInputTypeChanged(client);
157 // TODO(yoichio): Support inputmode HTML attribute. 158 // TODO(yoichio): Support inputmode HTML attribute.
158 } 159 }
159 160
160 void InputMethodAuraLinux::OnCaretBoundsChanged(const TextInputClient* client) { 161 void InputMethodAuraLinux::OnCaretBoundsChanged(const TextInputClient* client) {
161 if (!IsTextInputClientFocused(client)) 162 if (!IsTextInputClientFocused(client))
162 return; 163 return;
163 context_->SetCursorLocation(GetTextInputClient()->GetCaretBounds()); 164 context_->SetCursorLocation(GetTextInputClient()->GetCaretBounds());
164 } 165 }
165 166
166 void InputMethodAuraLinux::CancelComposition(const TextInputClient* client) { 167 void InputMethodAuraLinux::CancelComposition(const TextInputClient* client) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 318
318 void InputMethodAuraLinux::ConfirmCompositionText() { 319 void InputMethodAuraLinux::ConfirmCompositionText() {
319 TextInputClient* client = GetTextInputClient(); 320 TextInputClient* client = GetTextInputClient();
320 if (client && client->HasCompositionText()) 321 if (client && client->HasCompositionText())
321 client->ConfirmCompositionText(); 322 client->ConfirmCompositionText();
322 323
323 ResetContext(); 324 ResetContext();
324 } 325 }
325 326
326 } // namespace ui 327 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698