Update V8 to version 4.7.45.
[chromium-blink-merge.git] / ui / base / ime / input_method_observer.h
blob945545ec424958acbf26820bdc6362332e185ec8
1 // Copyright (c) 2013 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 UI_BASE_IME_INPUT_METHOD_OBSERVER_H_
6 #define UI_BASE_IME_INPUT_METHOD_OBSERVER_H_
8 #include "ui/base/ime/ui_base_ime_export.h"
10 namespace ui {
12 class InputMethod;
13 class TextInputClient;
15 class UI_BASE_IME_EXPORT InputMethodObserver {
16 public:
17 virtual ~InputMethodObserver() {}
19 // Called whenever the text input type is changed for the focused client.
20 // Currently only used by the mock input method for testing.
21 virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0;
23 // Called when the top-level system window gets keyboard focus. Currently
24 // only used by the mock input method for testing.
25 virtual void OnFocus() = 0;
27 // Called when the top-level system window loses keyboard focus. Currently
28 // only used by the mock input method for testing.
29 virtual void OnBlur() = 0;
31 // Called whenever the caret bounds is changed for the input client.
32 // Currently only used by the mock input method for testing.
33 virtual void OnCaretBoundsChanged(const TextInputClient* client) = 0;
35 // Called when either:
36 // - the TextInputClient is changed (e.g. by a change of focus)
37 // - the TextInputType of the TextInputClient changes
38 virtual void OnTextInputStateChanged(const TextInputClient* client) = 0;
40 // Called when the observed InputMethod is being destroyed.
41 virtual void OnInputMethodDestroyed(const InputMethod* input_method) = 0;
43 // Called when a user gesture should trigger showing the virtual keyboard
44 // or alternate input view (e.g. handwriting palette). Used in ChromeOS.
45 virtual void OnShowImeIfNeeded() = 0;
48 } // namespace ui
50 #endif // UI_BASE_IME_INPUT_METHOD_OBSERVER_H_