OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebInputMethodControllerImpl_h | 5 #ifndef WebInputMethodControllerImpl_h |
6 #define WebInputMethodControllerImpl_h | 6 #define WebInputMethodControllerImpl_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "public/web/WebCompositionUnderline.h" | 9 #include "public/web/WebCompositionUnderline.h" |
10 #include "public/web/WebInputMethodController.h" | 10 #include "public/web/WebInputMethodController.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 explicit WebInputMethodControllerImpl(WebLocalFrameImpl* ownerFrame); | 24 explicit WebInputMethodControllerImpl(WebLocalFrameImpl* ownerFrame); |
25 ~WebInputMethodControllerImpl() override; | 25 ~WebInputMethodControllerImpl() override; |
26 | 26 |
27 static WebInputMethodControllerImpl* fromFrame(LocalFrame*); | 27 static WebInputMethodControllerImpl* fromFrame(LocalFrame*); |
28 | 28 |
29 // WebInputMethodController overrides. | 29 // WebInputMethodController overrides. |
30 bool setComposition(const WebString& text, | 30 bool setComposition(const WebString& text, |
31 const WebVector<WebCompositionUnderline>& underlines, | 31 const WebVector<WebCompositionUnderline>& underlines, |
32 int selectionStart, | 32 int selectionStart, |
33 int selectionEnd) override; | 33 int selectionEnd) override; |
34 | |
35 // Used to ask the WebInputMethodController to either delete and ongoing | |
36 // composition, or insert the specified text, or move the caret according to | |
37 // relativeCaretPosition. | |
38 bool commitText(const WebString& text, int relativeCaretPosition) override; | 34 bool commitText(const WebString& text, int relativeCaretPosition) override; |
39 | |
40 // Called to ask the WebInputMethodController to confirm an ongoing | |
EhsanK
2016/11/18 23:19:57
Comments already exists in the abstract base class
| |
41 // composition. | |
42 bool finishComposingText( | 35 bool finishComposingText( |
43 ConfirmCompositionBehavior selectionBehavior) override; | 36 ConfirmCompositionBehavior selectionBehavior) override; |
37 WebTextInputInfo textInputInfo() override; | |
38 WebTextInputType textInputType() override; | |
44 | 39 |
45 void setSuppressNextKeypressEvent(bool suppress) { | 40 void setSuppressNextKeypressEvent(bool suppress) { |
46 m_suppressNextKeypressEvent = suppress; | 41 m_suppressNextKeypressEvent = suppress; |
47 } | 42 } |
48 | 43 |
49 DECLARE_TRACE(); | 44 DECLARE_TRACE(); |
50 | 45 |
51 private: | 46 private: |
52 LocalFrame* frame() const; | 47 LocalFrame* frame() const; |
53 InputMethodController& inputMethodController() const; | 48 InputMethodController& inputMethodController() const; |
54 WebPlugin* focusedPluginIfInputMethodSupported() const; | 49 WebPlugin* focusedPluginIfInputMethodSupported() const; |
55 | 50 |
56 WeakMember<WebLocalFrameImpl> m_webLocalFrame; | 51 WeakMember<WebLocalFrameImpl> m_webLocalFrame; |
57 bool m_suppressNextKeypressEvent; | 52 bool m_suppressNextKeypressEvent; |
58 }; | 53 }; |
59 } // namespace blink | 54 } // namespace blink |
60 | 55 |
61 #endif | 56 #endif |
OLD | NEW |