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