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

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

Issue 166823002: Fix DCHECK failure in RenderWidgetHostViewAura::InsertText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comment. Created 6 years, 10 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/environment.h" 7 #include "base/environment.h"
8 #include "ui/base/ime/linux/linux_input_method_context_factory.h" 8 #include "ui/base/ime/linux/linux_input_method_context_factory.h"
9 #include "ui/base/ime/text_input_client.h" 9 #include "ui/base/ime/text_input_client.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 bool InputMethodAuraLinux::IsCandidatePopupOpen() const { 146 bool InputMethodAuraLinux::IsCandidatePopupOpen() const {
147 // There seems no way to detect candidate windows or any popups. 147 // There seems no way to detect candidate windows or any popups.
148 return false; 148 return false;
149 } 149 }
150 150
151 // Overriden from ui::LinuxInputMethodContextDelegate 151 // Overriden from ui::LinuxInputMethodContextDelegate
152 152
153 void InputMethodAuraLinux::OnCommit(const base::string16& text) { 153 void InputMethodAuraLinux::OnCommit(const base::string16& text) {
154 TextInputClient* text_input_client = GetTextInputClient(); 154 if (!IsTextInputTypeNone())
155 if (text_input_client) 155 GetTextInputClient()->InsertText(text);
156 text_input_client->InsertText(text);
157 } 156 }
158 157
159 void InputMethodAuraLinux::OnPreeditChanged( 158 void InputMethodAuraLinux::OnPreeditChanged(
160 const CompositionText& composition_text) { 159 const CompositionText& composition_text) {
161 TextInputClient* text_input_client = GetTextInputClient(); 160 TextInputClient* text_input_client = GetTextInputClient();
162 if (text_input_client) 161 if (text_input_client)
163 text_input_client->SetCompositionText(composition_text); 162 text_input_client->SetCompositionText(composition_text);
164 } 163 }
165 164
166 void InputMethodAuraLinux::OnPreeditEnd() { 165 void InputMethodAuraLinux::OnPreeditEnd() {
(...skipping 10 matching lines...) Expand all
177 TextInputClient* focused_before, 176 TextInputClient* focused_before,
178 TextInputClient* focused) { 177 TextInputClient* focused) {
179 input_method_context_->Reset(); 178 input_method_context_->Reset();
180 input_method_context_->OnTextInputTypeChanged( 179 input_method_context_->OnTextInputTypeChanged(
181 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE); 180 focused ? focused->GetTextInputType() : TEXT_INPUT_TYPE_NONE);
182 181
183 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); 182 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused);
184 } 183 }
185 184
186 } // namespace ui 185 } // 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