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

Side by Side Diff: components/arc/ime/arc_ime_service.cc

Issue 2280503002: arc: Stop piggybacking "text input started" and "show virtual keyboard" events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | components/arc/ime/arc_ime_service_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/arc/ime/arc_ime_service.h" 5 #include "components/arc/ime/arc_ime_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 //////////////////////////////////////////////////////////////////////////////// 134 ////////////////////////////////////////////////////////////////////////////////
135 // Overridden from arc::ArcImeBridge::Delegate 135 // Overridden from arc::ArcImeBridge::Delegate
136 136
137 void ArcImeService::OnTextInputTypeChanged(ui::TextInputType type) { 137 void ArcImeService::OnTextInputTypeChanged(ui::TextInputType type) {
138 if (ime_type_ == type) 138 if (ime_type_ == type)
139 return; 139 return;
140 ime_type_ = type; 140 ime_type_ = type;
141 141
142 ui::InputMethod* const input_method = GetInputMethod(); 142 ui::InputMethod* const input_method = GetInputMethod();
143 if (input_method) { 143 if (input_method)
144 input_method->OnTextInputTypeChanged(this); 144 input_method->OnTextInputTypeChanged(this);
145 // TODO(crbug.com/581282): Remove this piggyback call when
146 // ImeInstance::ShowImeIfNeeded is wired to ARC.
147 if (input_method->GetTextInputClient() == this &&
148 ime_type_ != ui::TEXT_INPUT_TYPE_NONE) {
149 input_method->ShowImeIfNeeded();
150 }
151 }
152 } 145 }
153 146
154 void ArcImeService::OnCursorRectChanged(const gfx::Rect& rect) { 147 void ArcImeService::OnCursorRectChanged(const gfx::Rect& rect) {
155 if (cursor_rect_ == rect) 148 if (cursor_rect_ == rect)
156 return; 149 return;
157 cursor_rect_ = rect; 150 cursor_rect_ = rect;
158 151
159 ui::InputMethod* const input_method = GetInputMethod(); 152 ui::InputMethod* const input_method = GetInputMethod();
160 if (input_method) 153 if (input_method)
161 input_method->OnCaretBoundsChanged(this); 154 input_method->OnCaretBoundsChanged(this);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 base::i18n::TextDirection direction) { 325 base::i18n::TextDirection direction) {
333 return false; 326 return false;
334 } 327 }
335 328
336 bool ArcImeService::IsTextEditCommandEnabled( 329 bool ArcImeService::IsTextEditCommandEnabled(
337 ui::TextEditCommand command) const { 330 ui::TextEditCommand command) const {
338 return false; 331 return false;
339 } 332 }
340 333
341 } // namespace arc 334 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698