| Index: ui/base/ime/ime_engine_observer.h
|
| diff --git a/ui/base/ime/ime_engine_observer.h b/ui/base/ime/ime_engine_observer.h
|
| index 3bdcab1e9007e9ae69efa20dc9627fddd11fdd7a..7a2bf9d2682c2a15c66482abb245dd12063a1619 100644
|
| --- a/ui/base/ime/ime_engine_observer.h
|
| +++ b/ui/base/ime/ime_engine_observer.h
|
| @@ -14,6 +14,9 @@ class IMEEngineObserver {
|
| public:
|
| virtual ~IMEEngineObserver() {}
|
|
|
| + // Called when the IME becomes the active IME.
|
| + virtual void OnActivate(const std::string& engine_id) = 0;
|
| +
|
| // Called when a text field gains focus, and will be sending key events.
|
| virtual void OnFocus(
|
| const IMEEngineHandlerInterface::InputContext& context) = 0;
|
| @@ -37,6 +40,16 @@ class IMEEngineObserver {
|
| virtual void OnCompositionBoundsChanged(
|
| const std::vector<gfx::Rect>& bounds) = 0;
|
|
|
| + // Returns whether the observer is interested in key events.
|
| + virtual bool IsInterestedInKeyEvent() const = 0;
|
| +
|
| + // Called when a surrounding text is changed.
|
| + virtual void OnSurroundingTextChanged(const std::string& engine_id,
|
| + const std::string& text,
|
| + int cursor_pos,
|
| + int anchor_pos,
|
| + int offset_pos) = 0;
|
| +
|
| // ChromeOS only APIs.
|
| #if defined(OS_CHROMEOS)
|
|
|
| @@ -46,15 +59,11 @@ class IMEEngineObserver {
|
| MOUSE_BUTTON_MIDDLE,
|
| };
|
|
|
| - // Called when the IME becomes the active IME.
|
| - virtual void OnActivate(const std::string& engine_id) = 0;
|
| -
|
| // Called when an InputContext's properties change while it is focused.
|
| virtual void OnInputContextUpdate(
|
| const IMEEngineHandlerInterface::InputContext& context) = 0;
|
|
|
| - // Returns whether the observer is interested in key events.
|
| - virtual bool IsInterestedInKeyEvent() const = 0;
|
| +
|
|
|
| // Called when the user clicks on an item in the candidate list.
|
| virtual void OnCandidateClicked(const std::string& engine_id,
|
| @@ -64,13 +73,6 @@ class IMEEngineObserver {
|
| // Called when a menu item for this IME is interacted with.
|
| virtual void OnMenuItemActivated(const std::string& engine_id,
|
| const std::string& menu_id) = 0;
|
| -
|
| - // Called when a surrounding text is changed.
|
| - virtual void OnSurroundingTextChanged(const std::string& engine_id,
|
| - const std::string& text,
|
| - int cursor_pos,
|
| - int anchor_pos,
|
| - int offset_pos) = 0;
|
| #endif
|
| };
|
|
|
|
|