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

Unified Diff: chrome/browser/chromeos/input_method/input_method_engine.h

Issue 433163005: Refactoring for InputMethodEngine and InputMethodEventRouter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 6 years, 4 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
Index: chrome/browser/chromeos/input_method/input_method_engine.h
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.h b/chrome/browser/chromeos/input_method/input_method_engine.h
index d841a57164653e31f677a597721c505b03d483c4..a4de92b00f409fd4e7617340a944f165f9dd0b77 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.h
+++ b/chrome/browser/chromeos/input_method/input_method_engine.h
@@ -39,18 +39,10 @@ class InputMethodEngine : public InputMethodEngineInterface {
virtual ~InputMethodEngine();
void Initialize(scoped_ptr<InputMethodEngineInterface::Observer> observer,
- const char* engine_name,
- const char* extension_id,
- const char* engine_id,
- const std::vector<std::string>& languages,
- const std::vector<std::string>& layouts,
- const GURL& options_page,
- const GURL& input_view);
+ const char* extension_id);
// InputMethodEngineInterface overrides.
- virtual const input_method::InputMethodDescriptor& GetDescriptor()
- const OVERRIDE;
- virtual void NotifyImeReady() OVERRIDE;
+ virtual const std::string& GetActiveEngineId() const OVERRIDE;
virtual bool SetComposition(int context_id,
const char* text,
int selection_start,
@@ -86,7 +78,7 @@ class InputMethodEngine : public InputMethodEngineInterface {
virtual void FocusIn(
const IMEEngineHandlerInterface::InputContext& input_context) OVERRIDE;
virtual void FocusOut() OVERRIDE;
- virtual void Enable() OVERRIDE;
+ virtual void Enable(const std::string& engine_id) OVERRIDE;
virtual void Disable() OVERRIDE;
virtual void PropertyActivate(const std::string& property_name) OVERRIDE;
virtual void Reset() OVERRIDE;
@@ -107,14 +99,11 @@ class InputMethodEngine : public InputMethodEngineInterface {
// Enables or disables overriding input view page to Virtual Keyboard window.
void EnableInputView(bool enabled);
- // Descriptor of this input method.
- input_method::InputMethodDescriptor descriptor_;
+ // Gets the active input method descriptior from InputMethodManager.
+ const input_method::InputMethodDescriptor* GetCurrentInputMethod();
ui::TextInputType current_input_type_;
- // True if this engine is active.
- bool active_;
-
// ID that is used for the current input context. False if there is no focus.
int context_id_;
@@ -122,14 +111,11 @@ class InputMethodEngine : public InputMethodEngineInterface {
int next_context_id_;
// This IME ID in Chrome Extension.
- std::string engine_id_;
+ std::string active_engine_id_;
// This IME's Chrome Extension ID.
std::string extension_id_;
- // This IME ID in InputMethodManager.
- std::string imm_id_;
-
// The observer object recieving events for this IME.
scoped_ptr<InputMethodEngineInterface::Observer> observer_;
@@ -152,9 +138,6 @@ class InputMethodEngine : public InputMethodEngineInterface {
// Mapping of candidate id to index.
std::map<int, int> candidate_indexes_;
- // Used for input view window.
- GURL input_view_url_;
-
// Used with SendKeyEvents and ProcessKeyEvent to check if the key event
// sent to ProcessKeyEvent is sent by SendKeyEvents.
const ui::KeyEvent* sent_key_event_;

Powered by Google App Engine
This is Rietveld 408576698