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

Unified Diff: ui/base/ime/ime_engine_observer.h

Issue 1573903002: Change some functions in ImeEngineObserver as not ChromeOS-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
};
« no previous file with comments | « chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698