1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
6 #define COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
8 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
11 class WebGestureEvent
;
19 namespace html_viewer
{
21 // This class is used by HTMLWidgetRootLocal and HTMLWidgetLocalRoot for
22 // handling IME related stuff.
25 ImeController(mus::View
* view
, blink::WebWidget
* widget
);
28 // Methods called by WebWidget overrides.
29 void ResetInputMethod();
30 void DidHandleGestureEvent(const blink::WebGestureEvent
& event
,
31 bool event_cancelled
);
32 void DidUpdateTextOfFocusedElementByNonUserInput();
33 void ShowImeIfNeeded();
36 // Update text input state from WebWidget to mus::View. If the focused
37 // element is editable and |show_ime| is True, the software keyboard will be
39 void UpdateTextInputState(bool show_ime
);
43 blink::WebWidget
* widget_
;
45 blink::WebTextInputInfo text_input_info_
;
47 DISALLOW_COPY_AND_ASSIGN(ImeController
);
50 } // namespace html_viewer
52 #endif // COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_