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

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

Issue 2876693004: Implement GetTextFromRange(), GetTextRange() and GetSelectionRange() for ArcImeService. (Closed)
Patch Set: add TODOs in ime.mojom 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
« no previous file with comments | « components/arc/ime/arc_ime_bridge_impl.h ('k') | components/arc/ime/arc_ime_service.h » ('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_bridge_impl.h" 5 #include "components/arc/ime/arc_ime_bridge_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (!ime_instance) 134 if (!ime_instance)
135 return; 135 return;
136 136
137 ime_instance->ExtendSelectionAndDelete(before, after); 137 ime_instance->ExtendSelectionAndDelete(before, after);
138 } 138 }
139 139
140 void ArcImeBridgeImpl::OnTextInputTypeChanged(mojom::TextInputType type) { 140 void ArcImeBridgeImpl::OnTextInputTypeChanged(mojom::TextInputType type) {
141 delegate_->OnTextInputTypeChanged(ConvertTextInputType(type)); 141 delegate_->OnTextInputTypeChanged(ConvertTextInputType(type));
142 } 142 }
143 143
144 void ArcImeBridgeImpl::OnCursorRectChanged(mojom::CursorRectPtr rect) { 144 void ArcImeBridgeImpl::OnCursorRectChanged(gfx::Rect rect) {
145 delegate_->OnCursorRectChanged(gfx::Rect(rect->left, rect->top, 145 delegate_->OnCursorRectChanged(rect);
146 rect->right - rect->left,
147 rect->bottom - rect->top));
148 } 146 }
149 147
150 void ArcImeBridgeImpl::OnCancelComposition() { 148 void ArcImeBridgeImpl::OnCancelComposition() {
151 delegate_->OnCancelComposition(); 149 delegate_->OnCancelComposition();
152 } 150 }
153 151
154 void ArcImeBridgeImpl::ShowImeIfNeeded() { 152 void ArcImeBridgeImpl::ShowImeIfNeeded() {
155 delegate_->ShowImeIfNeeded(); 153 delegate_->ShowImeIfNeeded();
156 } 154 }
157 155
156 void ArcImeBridgeImpl::OnCursorRectChangedWithSurroundingText(
157 gfx::Rect rect,
158 gfx::Range text_range,
159 const std::string& text_in_range,
160 gfx::Range selection_range) {
161 delegate_->OnCursorRectChangedWithSurroundingText(
162 rect, text_range, base::UTF8ToUTF16(text_in_range), selection_range);
163 }
164
158 } // namespace arc 165 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/ime/arc_ime_bridge_impl.h ('k') | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698