| 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 "core/CoreExport.h" |
| 8 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 9 #include "platform/wtf/Allocator.h" | 10 #include "platform/wtf/Allocator.h" |
| 10 #include "public/web/WebCompositionUnderline.h" | 11 #include "public/web/WebCompositionUnderline.h" |
| 11 #include "public/web/WebInputMethodController.h" | 12 #include "public/web/WebInputMethodController.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 class InputMethodController; | 16 class InputMethodController; |
| 16 class LocalFrame; | 17 class LocalFrame; |
| 17 class WebLocalFrameImpl; | 18 class WebLocalFrameBase; |
| 18 class WebPlugin; | 19 class WebPlugin; |
| 19 class WebRange; | 20 class WebRange; |
| 20 class WebString; | 21 class WebString; |
| 21 | 22 |
| 22 class WebInputMethodControllerImpl : public WebInputMethodController { | 23 class CORE_EXPORT WebInputMethodControllerImpl |
| 24 : public NON_EXPORTED_BASE(WebInputMethodController) { |
| 23 WTF_MAKE_NONCOPYABLE(WebInputMethodControllerImpl); | 25 WTF_MAKE_NONCOPYABLE(WebInputMethodControllerImpl); |
| 24 DISALLOW_NEW(); | 26 DISALLOW_NEW(); |
| 25 | 27 |
| 26 public: | 28 public: |
| 27 explicit WebInputMethodControllerImpl(WebLocalFrameImpl& web_frame); | 29 explicit WebInputMethodControllerImpl(WebLocalFrameBase& web_frame); |
| 28 ~WebInputMethodControllerImpl() override; | 30 ~WebInputMethodControllerImpl() override; |
| 29 | 31 |
| 30 static WebInputMethodControllerImpl* FromFrame(LocalFrame*); | |
| 31 | |
| 32 // WebInputMethodController overrides. | 32 // WebInputMethodController overrides. |
| 33 bool SetComposition(const WebString& text, | 33 bool SetComposition(const WebString& text, |
| 34 const WebVector<WebCompositionUnderline>& underlines, | 34 const WebVector<WebCompositionUnderline>& underlines, |
| 35 const WebRange& replacement_range, | 35 const WebRange& replacement_range, |
| 36 int selection_start, | 36 int selection_start, |
| 37 int selection_end) override; | 37 int selection_end) override; |
| 38 bool CommitText(const WebString& text, | 38 bool CommitText(const WebString& text, |
| 39 const WebVector<WebCompositionUnderline>& underlines, | 39 const WebVector<WebCompositionUnderline>& underlines, |
| 40 const WebRange& replacement_range, | 40 const WebRange& replacement_range, |
| 41 int relative_caret_position) override; | 41 int relative_caret_position) override; |
| 42 bool FinishComposingText( | 42 bool FinishComposingText( |
| 43 ConfirmCompositionBehavior selection_behavior) override; | 43 ConfirmCompositionBehavior selection_behavior) override; |
| 44 WebTextInputInfo TextInputInfo() override; | 44 WebTextInputInfo TextInputInfo() override; |
| 45 WebTextInputType TextInputType() override; | 45 WebTextInputType TextInputType() override; |
| 46 | 46 |
| 47 DECLARE_TRACE(); | 47 DECLARE_TRACE(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 LocalFrame* GetFrame() const; | 50 LocalFrame* GetFrame() const; |
| 51 InputMethodController& GetInputMethodController() const; | 51 InputMethodController& GetInputMethodController() const; |
| 52 WebPlugin* FocusedPluginIfInputMethodSupported() const; | 52 WebPlugin* FocusedPluginIfInputMethodSupported() const; |
| 53 | 53 |
| 54 const Member<WebLocalFrameImpl> web_frame_; | 54 const Member<WebLocalFrameBase> web_frame_; |
| 55 }; | 55 }; |
| 56 } // namespace blink | 56 } // namespace blink |
| 57 | 57 |
| 58 #endif | 58 #endif |
| OLD | NEW |