Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / input_method / mock_input_method_manager.cc
index a4533a2..eef2bf0 100644 (file)
@@ -10,13 +10,18 @@ namespace input_method {
 MockInputMethodManager::MockInputMethodManager()
     : add_observer_count_(0),
       remove_observer_count_(0),
-      util_(&delegate_, whitelist_.GetSupportedInputMethods()) {
+      util_(&delegate_),
+      mod3_used_(false) {
   active_input_method_ids_.push_back("xkb:us::eng");
 }
 
 MockInputMethodManager::~MockInputMethodManager() {
 }
 
+InputMethodManager::State MockInputMethodManager::GetState() {
+  return InputMethodManager::STATE_BROWSER_SCREEN;
+}
+
 void MockInputMethodManager::AddObserver(
     InputMethodManager::Observer* observer) {
   ++add_observer_count_;
@@ -91,16 +96,18 @@ void MockInputMethodManager::ChangeInputMethod(
     const std::string& input_method_id) {
 }
 
-void MockInputMethodManager::ActivateInputMethodProperty(
+void MockInputMethodManager::ActivateInputMethodMenuItem(
     const std::string& key) {
 }
 
 void MockInputMethodManager::AddInputMethodExtension(
-    const std::string& id,
+    const std::string& extension_id,
+    const InputMethodDescriptors& descriptors,
     InputMethodEngineInterface* instance) {
 }
 
-void MockInputMethodManager::RemoveInputMethodExtension(const std::string& id) {
+void MockInputMethodManager::RemoveInputMethodExtension(
+    const std::string& extension_id) {
 }
 
 void MockInputMethodManager::GetInputMethodExtensions(
@@ -114,6 +121,10 @@ void MockInputMethodManager::SetEnabledExtensionImes(
 void MockInputMethodManager::SetInputMethodLoginDefault() {
 }
 
+void MockInputMethodManager::SetInputMethodLoginDefaultFromVPD(
+    const std::string& locale, const std::string& layout) {
+}
+
 bool MockInputMethodManager::SwitchToNextInputMethod() {
   return true;
 }
@@ -144,18 +155,15 @@ InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const {
   return descriptor;
 }
 
-InputMethodPropertyList
-MockInputMethodManager::GetCurrentInputMethodProperties() const {
-  return InputMethodPropertyList();
+bool MockInputMethodManager::IsISOLevel5ShiftUsedByCurrentInputMethod() const {
+  return mod3_used_;
 }
 
-void MockInputMethodManager::SetCurrentInputMethodProperties(
-    const InputMethodPropertyList& property_list) {
+bool MockInputMethodManager::IsAltGrUsedByCurrentInputMethod() const {
+  return false;
 }
 
-XKeyboard* MockInputMethodManager::GetXKeyboard() {
-  return &xkeyboard_;
-}
+ImeKeyboard* MockInputMethodManager::GetImeKeyboard() { return &keyboard_; }
 
 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() {
   return &util_;
@@ -163,7 +171,12 @@ InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() {
 
 ComponentExtensionIMEManager*
     MockInputMethodManager::GetComponentExtensionIMEManager() {
-  return NULL;
+  return comp_ime_manager_.get();
+}
+
+void MockInputMethodManager::SetComponentExtensionIMEManager(
+    scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager) {
+  comp_ime_manager_ = comp_ime_manager.Pass();
 }
 
 void MockInputMethodManager::set_application_locale(const std::string& value) {
@@ -174,5 +187,11 @@ bool MockInputMethodManager::IsLoginKeyboard(
     const std::string& layout) const {
   return true;
 }
+
+bool MockInputMethodManager::MigrateInputMethods(
+    std::vector<std::string>* input_method_ids) {
+  return false;
+}
+
 }  // namespace input_method
 }  // namespace chromeos