#include "chromeos/chromeos_export.h"
#include "chromeos/ime/input_method_descriptor.h"
+class Profile;
+
namespace ui {
class Accelerator;
} // namespace ui
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:
// 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;
// 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;
// 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;
// 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;
// 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;
};