Index: chromeos/ime/input_method_manager.h |
diff --git a/chromeos/ime/input_method_manager.h b/chromeos/ime/input_method_manager.h |
index c7b64778df7c125e60b23f8215660b9bbb73a24b..e7ba72430c8adaeb1ef5c3977830332346f3f59e 100644 |
--- a/chromeos/ime/input_method_manager.h |
+++ b/chromeos/ime/input_method_manager.h |
@@ -9,6 +9,7 @@ |
#include <string> |
#include <vector> |
+#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/chromeos_export.h" |
#include "chromeos/ime/input_method_descriptor.h" |
@@ -29,7 +30,7 @@ class ImeKeyboard; |
// InputMethodManager::Get(). |
class CHROMEOS_EXPORT InputMethodManager { |
public: |
- enum State { |
+ enum UIState { |
Shu Chen
2014/08/04 14:55:24
Maybe better to name it as "UISession" or "UIScree
Alexander Alekseev
2014/08/06 23:39:45
I've renamed it to UISessionState, because set met
|
STATE_LOGIN_SCREEN = 0, |
STATE_BROWSER_SCREEN, |
STATE_LOCK_SCREEN, |
@@ -59,6 +60,13 @@ class CHROMEOS_EXPORT InputMethodManager { |
virtual void CandidateWindowClosed(InputMethodManager* manager) = 0; |
}; |
+ class State : public base::RefCounted<InputMethodManager::State> { |
+ protected: |
+ friend base::RefCounted<InputMethodManager::State>; |
+ |
+ virtual ~State(); |
+ }; |
+ |
virtual ~InputMethodManager() {} |
// Gets the global instance of InputMethodManager. Initialize() must be called |
@@ -193,6 +201,11 @@ class CHROMEOS_EXPORT InputMethodManager { |
// Migrates the input method id to extension-based input method id. |
virtual bool MigrateInputMethods( |
std::vector<std::string>* input_method_ids) = 0; |
+ |
+ virtual scoped_refptr<State> CreateNewState( |
+ const std::string& debug_name) const = 0; |
+ |
+ virtual void SetState(scoped_refptr<State> state) = 0; |
}; |
} // namespace input_method |