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

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

Issue 2674253004: [refactor] Remove WebWidget::applyReplacementRange (Closed)
Patch Set: Rebased Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | third_party/WebKit/public/web/WebWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..353c2a84847392f09c4a63b852b2dab10261c667 100644
--- a/third_party/WebKit/public/web/WebInputMethodController.h
+++ b/third_party/WebKit/public/web/WebInputMethodController.h
@@ -12,6 +12,7 @@
namespace blink {
+class WebRange;
class WebString;
template <typename T>
class WebVector;
@@ -24,22 +25,27 @@ class WebInputMethodController {
};
virtual ~WebInputMethodController() {}
- // Called to inform the WebInputMethodController of a new composition text.
- // If selectionStart and selectionEnd has the same value, then it indicates
- // the input caret position. If the text is empty, then the existing
- // composition text will be canceled.
- // Returns true if the composition text was set successfully.
+
+ // Called to inform the WebInputMethodController of a new composition text. If
+ // selectionStart and selectionEnd has the same value, then it indicates the
+ // input caret position. If the text is empty, then the existing composition
+ // text will be canceled. |replacementRange| (when not null) is the range in
+ // current text which should be replaced by |text|. Returns true if the
+ // composition text was set successfully.
virtual bool setComposition(
const WebString& text,
const WebVector<WebCompositionUnderline>& underlines,
+ const WebRange& replacementRange,
int selectionStart,
int selectionEnd) = 0;
- // Called to inform the controller that deleting the ongoing composition if
- // any, inserting the specified text, and moving the caret according to
- // relativeCaretPosition.
+ // Called to inform the controller to delete the ongoing composition if any,
+ // insert |text|, and move the caret according to |relativeCaretPosition|.
+ // |replacementRange| (when not null) is the range in current text which
+ // should be replaced by |text|.
virtual bool commitText(const WebString& text,
const WebVector<WebCompositionUnderline>& underlines,
+ const WebRange& replacementRange,
int relativeCaretPosition) = 0;
// Called to inform the controller to confirm an ongoing composition.
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | third_party/WebKit/public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698