Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chromeos / ime / input_method_manager.h
index dbbed38..fefa0e1 100644 (file)
@@ -13,6 +13,8 @@
 #include "chromeos/chromeos_export.h"
 #include "chromeos/ime/input_method_descriptor.h"
 
+class Profile;
+
 namespace ui {
 class Accelerator;
 }  // namespace ui
@@ -22,7 +24,7 @@ class ComponentExtensionIMEManager;
 class InputMethodEngineInterface;
 namespace input_method {
 class InputMethodUtil;
-class XKeyboard;
+class ImeKeyboard;
 
 // This class manages input methodshandles.  Classes can add themselves as
 // observers. Clients can get an instance of this library class by:
@@ -74,6 +76,9 @@ class CHROMEOS_EXPORT InputMethodManager {
   // Destroy the global instance.
   static CHROMEOS_EXPORT void Shutdown();
 
+  // Get the current UI session state (e.g. login screen, lock screen, etc.).
+  virtual State GetState() = 0;
+
   // Adds an observer to receive notifications of input method related
   // changes as desribed in the Observer class above.
   virtual void AddObserver(Observer* observer) = 0;
@@ -139,11 +144,12 @@ class CHROMEOS_EXPORT InputMethodManager {
   // Adds an input method extension. This function does not takes ownership of
   // |instance|.
   virtual void AddInputMethodExtension(
-      const std::string& imm_id,
+      const std::string& extension_id,
+      const InputMethodDescriptors& descriptors,
       InputMethodEngineInterface* instance) = 0;
 
   // Removes an input method extension.
-  virtual void RemoveInputMethodExtension(const std::string& id) = 0;
+  virtual void RemoveInputMethodExtension(const std::string& extension_id) = 0;
 
   // Returns a list of descriptors for all Input Method Extensions.
   virtual void GetInputMethodExtensions(InputMethodDescriptors* result) = 0;
@@ -154,6 +160,11 @@ class CHROMEOS_EXPORT InputMethodManager {
   // Sets current input method to login default (first owners, then hardware).
   virtual void SetInputMethodLoginDefault() = 0;
 
+  // Sets current input method to login default with the given locale and
+  // layout info from VPD.
+  virtual void SetInputMethodLoginDefaultFromVPD(
+      const std::string& locale, const std::string& layout) = 0;
+
   // Gets the descriptor of the input method which is currently selected.
   virtual InputMethodDescriptor GetCurrentInputMethod() const = 0;
 
@@ -163,7 +174,7 @@ class CHROMEOS_EXPORT InputMethodManager {
 
   // Returns an X keyboard object which could be used to change the current XKB
   // layout, change the caps lock status, and set the auto repeat rate/interval.
-  virtual XKeyboard* GetXKeyboard() = 0;
+  virtual ImeKeyboard* GetImeKeyboard() = 0;
 
   // Returns an InputMethodUtil object.
   virtual InputMethodUtil* GetInputMethodUtil() = 0;
@@ -185,10 +196,8 @@ class CHROMEOS_EXPORT InputMethodManager {
   // If keyboard layout can be uset at login screen
   virtual bool IsLoginKeyboard(const std::string& layout) const = 0;
 
-  // Migrates the xkb id to extension-xkb id.
-  // TODO(shuchen): Remove this function after few milestones are passed.
-  // See: http://crbug.com/345604
-  virtual bool MigrateXkbInputMethods(
+  // Migrates the input method id to extension-based input method id.
+  virtual bool MigrateInputMethods(
       std::vector<std::string>* input_method_ids) = 0;
 };