| 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. |
| 34 bool commitText(const WebString& text, int relativeCaretPosition) override; | 38 bool commitText(const WebString& text, int relativeCaretPosition) override; |
| 39 |
| 40 // Called to ask the WebInputMethodController to confirm an ongoing |
| 41 // composition. |
| 35 bool finishComposingText( | 42 bool finishComposingText( |
| 36 ConfirmCompositionBehavior selectionBehavior) override; | 43 ConfirmCompositionBehavior selectionBehavior) override; |
| 37 WebTextInputInfo textInputInfo() override; | |
| 38 WebTextInputType textInputType() override; | |
| 39 | 44 |
| 40 void setSuppressNextKeypressEvent(bool suppress) { | 45 void setSuppressNextKeypressEvent(bool suppress) { |
| 41 m_suppressNextKeypressEvent = suppress; | 46 m_suppressNextKeypressEvent = suppress; |
| 42 } | 47 } |
| 43 | 48 |
| 44 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
| 45 | 50 |
| 46 private: | 51 private: |
| 47 LocalFrame* frame() const; | 52 LocalFrame* frame() const; |
| 48 InputMethodController& inputMethodController() const; | 53 InputMethodController& inputMethodController() const; |
| 49 WebPlugin* focusedPluginIfInputMethodSupported() const; | 54 WebPlugin* focusedPluginIfInputMethodSupported() const; |
| 50 | 55 |
| 51 WeakMember<WebLocalFrameImpl> m_webLocalFrame; | 56 WeakMember<WebLocalFrameImpl> m_webLocalFrame; |
| 52 bool m_suppressNextKeypressEvent; | 57 bool m_suppressNextKeypressEvent; |
| 53 }; | 58 }; |
| 54 } // namespace blink | 59 } // namespace blink |
| 55 | 60 |
| 56 #endif | 61 #endif |
| OLD | NEW |