Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: components/html_viewer/ime_controller.h

Issue 1677293002: Bye bye Mandoline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/html_viewer/html_widget.cc ('k') | components/html_viewer/ime_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
6 #define COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
7
8 #include "base/macros.h"
9 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
10
11 namespace blink {
12 class WebGestureEvent;
13 class WebWidget;
14 }
15
16 namespace mus {
17 class Window;
18 }
19
20 namespace html_viewer {
21
22 // This class is used by HTMLWidgetRootLocal and HTMLWidgetLocalRoot for
23 // handling IME related stuff.
24 class ImeController {
25 public:
26 ImeController(mus::Window* window, blink::WebWidget* widget);
27 ~ImeController();
28
29 // Methods called by WebWidget overrides.
30 void ResetInputMethod();
31 void DidHandleGestureEvent(const blink::WebGestureEvent& event,
32 bool event_cancelled);
33 void DidUpdateTextOfFocusedElementByNonUserInput();
34 void ShowImeIfNeeded();
35
36 private:
37 // Update text input state from WebWidget to mus::Window. If the focused
38 // element is editable and |show_ime| is True, the software keyboard will be
39 // shown.
40 void UpdateTextInputState(bool show_ime);
41
42 // Not owned objects.
43 mus::Window* window_;
44 blink::WebWidget* widget_;
45
46 blink::WebTextInputInfo text_input_info_;
47
48 DISALLOW_COPY_AND_ASSIGN(ImeController);
49 };
50
51 } // namespace html_viewer
52
53 #endif // COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/html_viewer/html_widget.cc ('k') | components/html_viewer/ime_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698