| Index: third_party/WebKit/Source/core/editing/InputMethodController.h
|
| diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.h b/third_party/WebKit/Source/core/editing/InputMethodController.h
|
| index 2a36cd448c04744b1a4cd951af5f87b778700fef..8ae1c7f14e9a944b3b0a4fda71e66bdc8003229d 100644
|
| --- a/third_party/WebKit/Source/core/editing/InputMethodController.h
|
| +++ b/third_party/WebKit/Source/core/editing/InputMethodController.h
|
| @@ -57,15 +57,19 @@ public:
|
| bool hasComposition() const;
|
| void setComposition(const String&, const Vector<CompositionUnderline>&, int selectionStart, int selectionEnd);
|
| void setCompositionFromExistingText(const Vector<CompositionUnderline>&, unsigned compositionStart, unsigned compositionEnd);
|
| +
|
| // Inserts the text that is being composed as a regular text and returns true
|
| // if composition exists.
|
| bool confirmComposition();
|
| - // Inserts the given text string in the place of the existing composition
|
| - // and returns true.
|
| - bool confirmComposition(const String& text, ConfirmCompositionBehavior confirmBehavior = KeepSelection);
|
| // Inserts the text that is being composed or specified non-empty text and
|
| - // returns true.
|
| - bool confirmCompositionOrInsertText(const String& text, ConfirmCompositionBehavior);
|
| + // returns true. This will not change the selection.
|
| + bool commitComposition(const String& text);
|
| + // Inserts the text that is being composed or specified non-empty text and
|
| + // returns true. This will change the selection according to
|
| + // relativeCaretPosition. If > 0, it's relative to the end of the text - 1;
|
| + // otherwise, it's relative to the start of the text.
|
| + bool commitCompositionAndMoveCaret(const String& text, int relativeCaretPosition);
|
| +
|
| // Deletes the existing composition text.
|
| void cancelComposition();
|
| void cancelCompositionIfSelectionIsInvalid();
|
| @@ -111,6 +115,16 @@ private:
|
| String composingText() const;
|
| void selectComposition() const;
|
| bool setSelectionOffsets(const PlainTextRange&, FrameSelection::SetSelectionOptions = FrameSelection::CloseTyping);
|
| +
|
| + bool insertText(const String&);
|
| + bool insertTextAndMoveCaret(const String&, int relativeCaretPosition);
|
| +
|
| + // Inserts the given text string in the place of the existing composition
|
| + // and returns true.
|
| + bool replaceComposition(const String& text, ConfirmCompositionBehavior confirmBehavior);
|
| + bool replaceCompositionAndMoveCaret(const String&, int relativeCaretPosition);
|
| +
|
| + bool moveCaret(int newCaretPosition);
|
| };
|
|
|
| } // namespace blink
|
|
|