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

Side by Side Diff: third_party/WebKit/public/web/WebInputMethodController.h

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebInputMethodController_h
6 #define WebInputMethodController_h
7
8 #include "WebCompositionUnderline.h"
9 #include "WebWidget.h"
10
11 namespace blink {
12
13 class WebString;
14 template <typename T>
15 class WebVector;
16
17 class WebInputMethodController {
18 public:
19 enum ConfirmCompositionBehavior {
20 DoNotKeepSelection,
21 KeepSelection,
22 };
23
24 virtual ~WebInputMethodController() {}
25 // Called to inform the WebInputMethodController of a new composition text.
26 // If selectionStart and selectionEnd has the same value, then it indicates
27 // the input caret position. If the text is empty, then the existing
28 // composition text will be canceled.
29 // Returns true if the composition text was set successfully.
30 virtual bool setComposition(
31 const WebString& text,
32 const WebVector<WebCompositionUnderline>& underlines,
33 int selectionStart,
34 int selectionEnd) = 0;
35
36 // Called to inform the WebWidget that deleting the ongoing composition if
37 // any, inserting the specified text, and moving the caret according to
38 // relativeCaretPosition.
39 virtual bool commitText(const WebString& text, int relativeCaretPosition) = 0;
40
41 // Called to inform the WebWidget to confirm an ongoing composition.
42 virtual bool finishComposingText(
43 ConfirmCompositionBehavior selectionBehavior) = 0;
44 };
45
46 } // namespace blink
47 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrameWidget.h ('k') | third_party/WebKit/public/web/WebPlugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698