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

Unified Diff: ui/base/ime/text_input_client.h

Issue 1282823002: Add text offset to OnSurroundingTextChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix formatting. Created 5 years, 4 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: ui/base/ime/text_input_client.h
diff --git a/ui/base/ime/text_input_client.h b/ui/base/ime/text_input_client.h
index aea24b2984920f5e191e7dfd6a44efdc703fff0f..d60c8def60defbd85552558773cdb10fa8048de4 100644
--- a/ui/base/ime/text_input_client.h
+++ b/ui/base/ime/text_input_client.h
@@ -99,7 +99,7 @@ class UI_BASE_IME_EXPORT TextInputClient {
// Document content operations ----------------------------------------------
- // Retrieves the UTF-16 based character range containing accessibled text in
+ // Retrieves the UTF-16 based character range containing accessible text in
// the View. It must cover the composition and selection range.
// Returns false if the information cannot be retrieved right now.
virtual bool GetTextRange(gfx::Range* range) const = 0;
@@ -117,6 +117,11 @@ class UI_BASE_IME_EXPORT TextInputClient {
// Returns false if the operation is not supported.
virtual bool SetSelectionRange(const gfx::Range& range) = 0;
+ // Retrieves the text selection offset. Since only a subset of surrounding
+ // text is cached, this value indicates the offset of the selection relative
+ // to the entire text body.
+ virtual uint32 GetSelectionOffset() const = 0;
Shu Chen 2015/08/12 07:23:16 What's the difference between "GetSelectionRange(&
rsadam 2015/08/12 21:46:52 Renamed it to GetTextOffset and updated the commen
+
// Deletes contents in the given UTF-16 based character range. Current
// composition text will be confirmed before deleting the range.
// The input caret will be moved to the place where the range gets deleted.

Powered by Google App Engine
This is Rietveld 408576698