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

Unified Diff: third_party/WebKit/public/web/WebInputMethodController.h

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/public/web/WebInputMethodController.h
diff --git a/third_party/WebKit/public/web/WebInputMethodController.h b/third_party/WebKit/public/web/WebInputMethodController.h
index 090d2be7657ef0e9f76d28459120c3de1f99c67f..80cab8a89a86f4709eacaef13b02208eab6ec9cd 100644
--- a/third_party/WebKit/public/web/WebInputMethodController.h
+++ b/third_party/WebKit/public/web/WebInputMethodController.h
@@ -6,8 +6,10 @@
#define WebInputMethodController_h
#include "../platform/WebTextInputInfo.h"
+
#include "WebCompositionUnderline.h"
#include "WebTextInputType.h"
+#include "WebTextSuggestionInfo.h"
#include "WebWidget.h"
namespace blink {
@@ -46,6 +48,11 @@ class WebInputMethodController {
virtual bool finishComposingText(
ConfirmCompositionBehavior selectionBehavior) = 0;
+ virtual void applySuggestionReplacement(int documentMarkerID,
+ int suggestionIndex) = 0;
+ virtual void deleteSuggestionHighlight() = 0;
+ virtual void closeSuggestionMenu() = 0;
+
// Returns information about the current text input of this controller. Note
// that this query can be expensive for long fields, as it returns the
// plain-text representation of the current editable element. Consider using
@@ -54,6 +61,15 @@ class WebInputMethodController {
// Returns the type of current text input of this controller.
virtual WebTextInputType textInputType() { return WebTextInputTypeNone; }
+
+ // Returns a list of text suggestion spans under the selection caret
+ // (if the selection is not of type caret, returns an empty vector)
+ virtual WebVector<WebTextSuggestionInfo>
+ getTextSuggestionInfosUnderCaret() = 0;
+
+ // Called to let the controller prepare for a text suggestion menu to be shown
+ // (e.g. by hiding the selection caret)
+ virtual void prepareForTextSuggestionMenuToBeShown() = 0;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698