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

Unified Diff: components/arc/ime/arc_ime_bridge_impl.cc

Issue 2876693004: Implement GetTextFromRange(), GetTextRange() and GetSelectionRange() for ArcImeService. (Closed)
Patch Set: save surrounding text even if cursor rect is not changed 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/ime/arc_ime_bridge_impl.cc
diff --git a/components/arc/ime/arc_ime_bridge_impl.cc b/components/arc/ime/arc_ime_bridge_impl.cc
index 13d787ef5eca056fcc8b2189b5b49b7b2709feb2..4a5f0c4220fd018173f79dd9f4a29404964024c0 100644
--- a/components/arc/ime/arc_ime_bridge_impl.cc
+++ b/components/arc/ime/arc_ime_bridge_impl.cc
@@ -155,4 +155,17 @@ void ArcImeBridgeImpl::ShowImeIfNeeded() {
delegate_->ShowImeIfNeeded();
}
+void ArcImeBridgeImpl::OnCursorRectChangedWithSurroundingText(
+ mojom::CursorRectPtr rect,
+ mojom::TextRangePtr text_range,
+ const std::string& text_in_range,
+ mojom::TextRangePtr selection_range) {
+ delegate_->OnCursorRectChangedWithSurroundingText(
+ gfx::Rect(rect->left, rect->top, rect->right - rect->left,
+ rect->bottom - rect->top),
+ gfx::Range(text_range->start, text_range->end),
+ base::UTF8ToUTF16(text_in_range),
+ gfx::Range(selection_range->start, selection_range->end));
+}
+
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698