| Index: third_party/WebKit/Source/web/WebInputMethodControllerImpl.h
|
| diff --git a/third_party/WebKit/Source/core/frame/DOMVisualViewport.h b/third_party/WebKit/Source/web/WebInputMethodControllerImpl.h
|
| similarity index 50%
|
| copy from third_party/WebKit/Source/core/frame/DOMVisualViewport.h
|
| copy to third_party/WebKit/Source/web/WebInputMethodControllerImpl.h
|
| index 2d3a1b508ecf51394124ee6055b36913d5eb5e52..7060bd68513f636e39c30197766e8ebd2994d313 100644
|
| --- a/third_party/WebKit/Source/core/frame/DOMVisualViewport.h
|
| +++ b/third_party/WebKit/Source/web/WebInputMethodControllerImpl.h
|
| @@ -28,49 +28,57 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef DOMVisualViewport_h
|
| -#define DOMVisualViewport_h
|
| +#ifndef WebInputMethodControllerImpl_h
|
| +#define WebInputMethodControllerImpl_h
|
|
|
| -#include "bindings/core/v8/ScriptWrappable.h"
|
| -#include "core/dom/ExecutionContext.h"
|
| -#include "core/events/EventTarget.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "public/web/WebCompositionUnderline.h"
|
| +#include "public/web/WebInputMethodController.h"
|
|
|
| namespace blink {
|
|
|
| -class LocalDOMWindow;
|
| -class ExecutionContext;
|
| +class InputMethodController;
|
| +class LocalFrame;
|
| +class WebLocalFrameImpl;
|
| +class WebPlugin;
|
| +class WebString;
|
| +
|
| +class WebInputMethodControllerImpl : public WebInputMethodController {
|
| + WTF_MAKE_NONCOPYABLE(WebInputMethodControllerImpl);
|
|
|
| -class DOMVisualViewport final : public EventTargetWithInlineData {
|
| - DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| - static DOMVisualViewport* create(LocalDOMWindow* window)
|
| - {
|
| - return new DOMVisualViewport(window);
|
| - }
|
| + explicit WebInputMethodControllerImpl(WebLocalFrameImpl* ownerFrame);
|
| + ~WebInputMethodControllerImpl() override;
|
| +
|
| + static WebInputMethodControllerImpl* fromFrame(LocalFrame*);
|
|
|
| - ~DOMVisualViewport() override;
|
| + // WebInputMethodController overrides.
|
| + bool setComposition(
|
| + const WebString& text,
|
| + const WebVector<WebCompositionUnderline>& underlines,
|
| + int selectionStart, int selectionEnd) override;
|
|
|
| - DECLARE_VIRTUAL_TRACE();
|
| + // Used to ask the WebInputMethodController to either delete and ongoing
|
| + // composition, or insert the specified text, or move the caret according to
|
| + // relativeCaretPosition.
|
| + bool commitText(const WebString& text, int relativeCaretPosition) override;
|
|
|
| - // EventTarget overrides:
|
| - const AtomicString& interfaceName() const override;
|
| - ExecutionContext* getExecutionContext() const override;
|
| + // Called to ask the WebInputMethodController to confirm an ongoing
|
| + // composition.
|
| + bool finishComposingText(ConfirmCompositionBehavior selectionBehavior) override;
|
|
|
| - double scrollLeft();
|
| - double scrollTop();
|
| - double pageX();
|
| - double pageY();
|
| - double clientWidth();
|
| - double clientHeight();
|
| - double scale();
|
| + void setSuppressNextKeypressEvent(bool suppress) { m_suppressNextKeypressEvent = suppress; }
|
| +
|
| + DECLARE_TRACE();
|
|
|
| private:
|
| - explicit DOMVisualViewport(LocalDOMWindow*);
|
| + LocalFrame* frame() const;
|
| + InputMethodController& inputMethodController() const;
|
| + WebPlugin* focusedPluginIfInputMethodSupported() const;
|
|
|
| - Member<LocalDOMWindow> m_window;
|
| + WeakMember<WebLocalFrameImpl> m_webLocalFrame;
|
| + bool m_suppressNextKeypressEvent;
|
| };
|
| -
|
| } // namespace blink
|
|
|
| -#endif // DOMVisualViewport_h
|
| +#endif
|
|
|