Chromium Code Reviews| 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 "public/web/WebCompositionUnderline.h" | 10 #include "public/web/WebCompositionUnderline.h" |
| 10 #include "public/web/WebInputMethodController.h" | 11 #include "public/web/WebInputMethodController.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 class InputMethodController; | 15 class InputMethodController; |
| 15 class LocalFrame; | 16 class LocalFrame; |
| 16 class WebLocalFrameImpl; | 17 class WebLocalFrameBase; |
| 17 class WebPlugin; | 18 class WebPlugin; |
| 18 class WebRange; | 19 class WebRange; |
| 19 class WebString; | 20 class WebString; |
| 20 | 21 |
| 21 class WebInputMethodControllerImpl : public WebInputMethodController { | 22 class CORE_EXPORT WebInputMethodControllerImpl |
| 23 : public WebInputMethodController { | |
| 22 WTF_MAKE_NONCOPYABLE(WebInputMethodControllerImpl); | 24 WTF_MAKE_NONCOPYABLE(WebInputMethodControllerImpl); |
| 23 | 25 |
| 24 public: | 26 public: |
| 25 explicit WebInputMethodControllerImpl(WebLocalFrameImpl* owner_frame); | 27 explicit WebInputMethodControllerImpl(WebLocalFrameBase* owner_frame); |
| 26 ~WebInputMethodControllerImpl() override; | 28 ~WebInputMethodControllerImpl() override; |
| 27 | 29 |
| 28 static WebInputMethodControllerImpl* FromFrame(LocalFrame*); | |
| 29 | |
| 30 // WebInputMethodController overrides. | 30 // WebInputMethodController overrides. |
| 31 bool SetComposition(const WebString& text, | 31 bool SetComposition(const WebString& text, |
| 32 const WebVector<WebCompositionUnderline>& underlines, | 32 const WebVector<WebCompositionUnderline>& underlines, |
| 33 const WebRange& replacement_range, | 33 const WebRange& replacement_range, |
| 34 int selection_start, | 34 int selection_start, |
| 35 int selection_end) override; | 35 int selection_end) override; |
| 36 bool CommitText(const WebString& text, | 36 bool CommitText(const WebString& text, |
| 37 const WebVector<WebCompositionUnderline>& underlines, | 37 const WebVector<WebCompositionUnderline>& underlines, |
| 38 const WebRange& replacement_range, | 38 const WebRange& replacement_range, |
| 39 int relative_caret_position) override; | 39 int relative_caret_position) override; |
| 40 bool FinishComposingText( | 40 bool FinishComposingText( |
| 41 ConfirmCompositionBehavior selection_behavior) override; | 41 ConfirmCompositionBehavior selection_behavior) override; |
| 42 WebTextInputInfo TextInputInfo() override; | 42 WebTextInputInfo TextInputInfo() override; |
| 43 WebTextInputType TextInputType() override; | 43 WebTextInputType TextInputType() override; |
| 44 | 44 |
| 45 DECLARE_TRACE(); | 45 DECLARE_TRACE(); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 LocalFrame* GetFrame() const; | 48 LocalFrame* GetFrame() const; |
| 49 InputMethodController& GetInputMethodController() const; | 49 InputMethodController& GetInputMethodController() const; |
| 50 WebPlugin* FocusedPluginIfInputMethodSupported() const; | 50 WebPlugin* FocusedPluginIfInputMethodSupported() const; |
| 51 | 51 |
| 52 WeakMember<WebLocalFrameImpl> web_local_frame_; | 52 WeakMember<WebLocalFrameBase> web_local_frame_; |
|
dcheng
2017/05/23 01:43:31
FYI, I just changed this in https://chromium-revie
| |
| 53 }; | 53 }; |
| 54 } // namespace blink | 54 } // namespace blink |
| 55 | 55 |
| 56 #endif | 56 #endif |
| OLD | NEW |