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

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

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Remove logging statements, fix copyright years in new files 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..e352ee0fa35179a2df225ac686dcdac2e5338b9a 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 suggestionMenuClosed() = 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;
esprehn 2017/01/31 22:41:35 We shouldn't need this or prepareForTextSuggestion
rlanday 2017/01/31 23:30:10 Because everything's going to be in mojo? Ok
+
+ // 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