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

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api.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 | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/input_ime/input_ime_api.h
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h
index 8b34769453f076bd73d7cc9df2b3d37318534cc3..640823d0fdedd63eac435ceb4f35e00776dd0f20 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h
@@ -42,6 +42,7 @@ class ImeObserver : public IMEEngineObserver {
~ImeObserver() override {}
// IMEEngineObserver overrides.
+ void OnActivate(const std::string& component_id) override;
void OnFocus(const IMEEngineHandlerInterface::InputContext& context) override;
void OnBlur(int context_id) override;
void OnKeyEvent(
@@ -52,6 +53,12 @@ class ImeObserver : public IMEEngineObserver {
void OnDeactivated(const std::string& component_id) override;
void OnCompositionBoundsChanged(
const std::vector<gfx::Rect>& bounds) override;
+ bool IsInterestedInKeyEvent() const override;
+ void OnSurroundingTextChanged(const std::string& component_id,
+ const std::string& text,
+ int cursor_pos,
+ int anchor_pos,
+ int offset_pos) override;
protected:
// Helper function used to forward the given event to the |profile_|'s event
@@ -61,6 +68,9 @@ class ImeObserver : public IMEEngineObserver {
const std::string& event_name,
scoped_ptr<base::ListValue> args) = 0;
+ // Returns the type of the current screen.
+ virtual std::string GetCurrentScreenType() = 0;
+
// Returns true if the extension is ready to accept key event, otherwise
// returns false.
bool ShouldForwardKeyEvent() const;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698