summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/extensions/input_method_event_router.h2
-rw-r--r--chrome/browser/chromeos/input_method/accessibility.cc4
-rw-r--r--chrome/browser/chromeos/input_method/accessibility.h2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_engine.cc19
-rw-r--r--chrome/browser/chromeos/input_method/input_method_engine.h11
-rw-r--r--chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc7
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl.cc49
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl.h12
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc96
-rw-r--r--chrome/browser/chromeos/input_method/input_method_persistence.cc3
-rw-r--r--chrome/browser/chromeos/input_method/input_method_persistence.h1
-rw-r--r--chrome/browser/chromeos/input_method/mock_input_method_engine.h7
-rw-r--r--chrome/browser/chromeos/input_method/mock_input_method_manager.cc11
-rw-r--r--chrome/browser/chromeos/input_method/mock_input_method_manager.h6
-rw-r--r--chrome/browser/chromeos/input_method/mode_indicator_controller.cc5
-rw-r--r--chrome/browser/chromeos/input_method/mode_indicator_controller.h1
16 files changed, 100 insertions, 136 deletions
diff --git a/chrome/browser/chromeos/extensions/input_method_event_router.h b/chrome/browser/chromeos/extensions/input_method_event_router.h
index b7f0169..91bfb34 100644
--- a/chrome/browser/chromeos/extensions/input_method_event_router.h
+++ b/chrome/browser/chromeos/extensions/input_method_event_router.h
@@ -28,8 +28,6 @@ class ExtensionInputMethodEventRouter
virtual void InputMethodChanged(
input_method::InputMethodManager* manager,
bool show_message) OVERRIDE;
- virtual void InputMethodPropertyChanged(
- input_method::InputMethodManager* manager) OVERRIDE {}
private:
content::BrowserContext* context_;
diff --git a/chrome/browser/chromeos/input_method/accessibility.cc b/chrome/browser/chromeos/input_method/accessibility.cc
index 5047d12..f830d57 100644
--- a/chrome/browser/chromeos/input_method/accessibility.cc
+++ b/chrome/browser/chromeos/input_method/accessibility.cc
@@ -54,9 +54,5 @@ void Accessibility::InputMethodChanged(InputMethodManager* imm,
ui::AccessibilityTypes::EVENT_ALERT, &event);
}
-void Accessibility::InputMethodPropertyChanged(InputMethodManager* imm) {
- // Do nothing.
-}
-
} // namespace input_method
} // namespace chromeos
diff --git a/chrome/browser/chromeos/input_method/accessibility.h b/chrome/browser/chromeos/input_method/accessibility.h
index ed04ae0..60fb084 100644
--- a/chrome/browser/chromeos/input_method/accessibility.h
+++ b/chrome/browser/chromeos/input_method/accessibility.h
@@ -21,8 +21,6 @@ class Accessibility
// InputMethodManager::Observer implementation.
virtual void InputMethodChanged(InputMethodManager* imm,
bool show_message) OVERRIDE;
- virtual void InputMethodPropertyChanged(InputMethodManager* imm) OVERRIDE;
-
InputMethodManager* imm_;
DISALLOW_COPY_AND_ASSIGN(Accessibility);
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
index ff298c6..b32a8a8 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -14,6 +14,8 @@
#undef RootWindow
#include <map>
+#include "ash/ime/input_method_menu_item.h"
+#include "ash/ime/input_method_menu_manager.h"
#include "ash/shell.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -375,19 +377,17 @@ bool InputMethodEngine::UpdateMenuItems(
if (!active_)
return false;
- input_method::InputMethodPropertyList property_list;
+ ash::ime::InputMethodMenuItemList menu_item_list;
for (std::vector<MenuItem>::const_iterator item = items.begin();
item != items.end(); ++item) {
- input_method::InputMethodProperty property;
+ ash::ime::InputMethodMenuItem property;
MenuItemToProperty(*item, &property);
- property_list.push_back(property);
+ menu_item_list.push_back(property);
}
- input_method::InputMethodManager* manager =
- input_method::InputMethodManager::Get();
- if (manager)
- manager->SetCurrentInputMethodProperties(property_list);
-
+ ash::ime::InputMethodMenuManager::GetInstance()->
+ SetCurrentInputMethodMenuItemList(
+ menu_item_list);
return true;
}
@@ -595,9 +595,10 @@ void InputMethodEngine::SetSurroundingText(const std::string& text,
static_cast<int>(anchor_pos));
}
+// TODO(uekawa): rename this method to a more reasonable name.
void InputMethodEngine::MenuItemToProperty(
const MenuItem& item,
- input_method::InputMethodProperty* property) {
+ ash::ime::InputMethodMenuItem* property) {
property->key = item.id;
if (item.modified & MENU_ITEM_MODIFIED_LABEL) {
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.h b/chrome/browser/chromeos/input_method/input_method_engine.h
index 2d3bd1a..e365228 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.h
+++ b/chrome/browser/chromeos/input_method/input_method_engine.h
@@ -17,12 +17,17 @@ class CandidateWindow;
class KeyEvent;
} // namespace ui
+namespace ash {
+namespace ime {
+struct InputMethodMenuItem;
+} // namespace ime
+} // namespace ash
+
namespace chromeos {
class CompositionText;
namespace input_method {
-struct InputMethodProperty;
struct KeyEventHandle;
} // namespace input_method
@@ -95,9 +100,9 @@ class InputMethodEngine : public InputMethodEngineInterface {
virtual void HideInputView() OVERRIDE;
private:
- // Converts MenuItem to InputMethodProperty.
+ // Converts MenuItem to InputMethodMenuItem.
void MenuItemToProperty(const MenuItem& item,
- input_method::InputMethodProperty* property);
+ ash::ime::InputMethodMenuItem* property);
// Descriptor of this input method.
input_method::InputMethodDescriptor descriptor_;
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc b/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc
index 0823c29..83c681be 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ash/ime/input_method_menu_item.h"
+#include "ash/ime/input_method_menu_manager.h"
#include "base/bind_helpers.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_browsertest.h"
@@ -800,8 +802,9 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
ASSERT_TRUE(content::ExecuteScript(
host->host_contents(), set_menu_item_test_script));
- const InputMethodPropertyList& props =
- InputMethodManager::Get()->GetCurrentInputMethodProperties();
+ const ash::ime::InputMethodMenuItemList& props =
+ ash::ime::InputMethodMenuManager::GetInstance()->
+ GetCurrentInputMethodMenuItemList();
ASSERT_EQ(5U, props.size());
EXPECT_EQ("ID0", props[0].key);
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 3432e7b..8fda319 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -6,6 +6,8 @@
#include <algorithm> // std::find
+#include "ash/ime/input_method_menu_item.h"
+#include "ash/ime/input_method_menu_manager.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/location.h"
@@ -357,8 +359,11 @@ bool InputMethodManagerImpl::ChangeInputMethodInternal(
// extension IMEs via InputMethodEngine::(Set|Update)MenuItems.
// If the current input method is a keyboard layout, empty
// properties are sufficient.
- const InputMethodPropertyList empty_property_list;
- SetCurrentInputMethodProperties(empty_property_list);
+ const ash::ime::InputMethodMenuItemList empty_menu_item_list;
+ ash::ime::InputMethodMenuManager* input_method_menu_manager =
+ ash::ime::InputMethodMenuManager::GetInstance();
+ input_method_menu_manager->SetCurrentInputMethodMenuItemList(
+ empty_menu_item_list);
const InputMethodDescriptor* descriptor = NULL;
if (extension_ime_util::IsExtensionIME(input_method_id_to_switch)) {
@@ -426,21 +431,20 @@ void InputMethodManagerImpl::LoadNecessaryComponentExtensions() {
}
}
-void InputMethodManagerImpl::ActivateInputMethodProperty(
+void InputMethodManagerImpl::ActivateInputMethodMenuItem(
const std::string& key) {
DCHECK(!key.empty());
- for (size_t i = 0; i < property_list_.size(); ++i) {
- if (property_list_[i].key == key) {
- IMEEngineHandlerInterface* engine =
- IMEBridge::Get()->GetCurrentEngineHandler();
- if (engine)
- engine->PropertyActivate(key);
- return;
- }
+ if (ash::ime::InputMethodMenuManager::GetInstance()->
+ HasInputMethodMenuItemForKey(key)) {
+ IMEEngineHandlerInterface* engine =
+ IMEBridge::Get()->GetCurrentEngineHandler();
+ if (engine)
+ engine->PropertyActivate(key);
+ return;
}
- DVLOG(1) << "ActivateInputMethodProperty: unknown key: " << key;
+ DVLOG(1) << "ActivateInputMethodMenuItem: unknown key: " << key;
}
void InputMethodManagerImpl::AddInputMethodExtension(
@@ -696,21 +700,6 @@ InputMethodDescriptor InputMethodManagerImpl::GetCurrentInputMethod() const {
return current_input_method_;
}
-InputMethodPropertyList
-InputMethodManagerImpl::GetCurrentInputMethodProperties() const {
- // This check is necessary since an IME property (e.g. for Pinyin) might be
- // sent from ibus-daemon AFTER the current input method is switched to XKB.
- if (InputMethodUtil::IsKeyboardLayout(GetCurrentInputMethod().id()))
- return InputMethodPropertyList(); // Empty list.
- return property_list_;
-}
-
-void InputMethodManagerImpl::SetCurrentInputMethodProperties(
- const InputMethodPropertyList& property_list) {
- property_list_ = property_list;
- PropertyChanged();
-}
-
XKeyboard* InputMethodManagerImpl::GetXKeyboard() {
return xkeyboard_.get();
}
@@ -766,12 +755,6 @@ void InputMethodManagerImpl::InitializeComponentExtensionForTesting(
OnComponentExtensionInitialized(delegate.Pass());
}
-void InputMethodManagerImpl::PropertyChanged() {
- FOR_EACH_OBSERVER(InputMethodManager::Observer,
- observers_,
- InputMethodPropertyChanged(this));
-}
-
void InputMethodManagerImpl::CandidateClicked(int index) {
IMEEngineHandlerInterface* engine =
IMEBridge::Get()->GetCurrentEngineHandler();
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.h b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
index 889a3f2..1969083 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.h
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
@@ -67,7 +67,7 @@ class InputMethodManagerImpl : public InputMethodManager,
virtual bool EnableInputMethod(const std::string& new_active_input_method_id)
OVERRIDE;
virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE;
- virtual void ActivateInputMethodProperty(const std::string& key) OVERRIDE;
+ virtual void ActivateInputMethodMenuItem(const std::string& key) OVERRIDE;
virtual void AddInputMethodExtension(
const std::string& id,
InputMethodEngineInterface* instance) OVERRIDE;
@@ -81,10 +81,6 @@ class InputMethodManagerImpl : public InputMethodManager,
const ui::Accelerator& accelerator) OVERRIDE;
virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE;
virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE;
- virtual InputMethodPropertyList
- GetCurrentInputMethodProperties() const OVERRIDE;
- virtual void SetCurrentInputMethodProperties(
- const InputMethodPropertyList& property_list) OVERRIDE;
virtual XKeyboard* GetXKeyboard() OVERRIDE;
virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE;
@@ -102,9 +98,6 @@ class InputMethodManagerImpl : public InputMethodManager,
scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate);
private:
- // Notifies observers that the property list is updated.
- void PropertyChanged();
-
// CandidateWindowController::Observer overrides:
virtual void CandidateClicked(int index) OVERRIDE;
virtual void CandidateWindowOpened() OVERRIDE;
@@ -190,9 +183,6 @@ class InputMethodManagerImpl : public InputMethodManager,
// those created by extension.
std::map<std::string, InputMethodDescriptor> extra_input_methods_;
- // Property list of the input method. This is set by extension IMEs.
- InputMethodPropertyList property_list_;
-
// The candidate window. This will be deleted when the APP_TERMINATING
// message is sent.
scoped_ptr<CandidateWindowController> candidate_window_controller_;
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
index cc22f78..4eed0cb 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -6,6 +6,8 @@
#include <algorithm>
+#include "ash/ime/input_method_menu_item.h"
+#include "ash/ime/input_method_menu_manager.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -72,6 +74,8 @@ class InputMethodManagerImplTest : public testing::Test {
IMEBridge::Initialize();
IMEBridge::Get()->SetCurrentEngineHandler(mock_engine_handler_.get());
+ menu_manager_ = ash::ime::InputMethodMenuManager::GetInstance();
+
ime_list_.clear();
ComponentExtensionIME ext1;
@@ -122,6 +126,7 @@ class InputMethodManagerImplTest : public testing::Test {
candidate_window_controller_ = NULL;
xkeyboard_ = NULL;
manager_.reset();
+
IMEBridge::Get()->SetCurrentEngineHandler(NULL);
IMEBridge::Shutdown();
}
@@ -154,16 +159,18 @@ class InputMethodManagerImplTest : public testing::Test {
base::MessageLoop message_loop_;
MockComponentExtIMEManagerDelegate* mock_delegate_;
std::vector<ComponentExtensionIME> ime_list_;
+ ash::ime::InputMethodMenuManager* menu_manager_;
private:
DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImplTest);
};
-class TestObserver : public InputMethodManager::Observer {
+class TestObserver : public InputMethodManager::Observer,
+ public ash::ime::InputMethodMenuManager::Observer{
public:
TestObserver()
: input_method_changed_count_(0),
- input_method_property_changed_count_(0),
+ input_method_menu_item_changed_count_(0),
last_show_message_(false) {
}
virtual ~TestObserver() {}
@@ -173,13 +180,13 @@ class TestObserver : public InputMethodManager::Observer {
++input_method_changed_count_;
last_show_message_ = show_message;
}
- virtual void InputMethodPropertyChanged(
- InputMethodManager* manager) OVERRIDE {
- ++input_method_property_changed_count_;
+ virtual void InputMethodMenuItemChanged(
+ ash::ime::InputMethodMenuManager* manager) OVERRIDE {
+ ++input_method_menu_item_changed_count_;
}
int input_method_changed_count_;
- int input_method_property_changed_count_;
+ int input_method_menu_item_changed_count_;
bool last_show_message_;
private:
@@ -240,14 +247,15 @@ TEST_F(InputMethodManagerImplTest, TestObserver) {
TestObserver observer;
InitComponentExtension();
manager_->AddObserver(&observer);
+ menu_manager_->AddObserver(&observer);
EXPECT_EQ(0, observer.input_method_changed_count_);
manager_->EnableLoginLayouts("en-US", keyboard_layouts);
EXPECT_EQ(1, observer.input_method_changed_count_);
- EXPECT_EQ(1, observer.input_method_property_changed_count_);
+ EXPECT_EQ(1, observer.input_method_menu_item_changed_count_);
manager_->ChangeInputMethod("xkb:us:dvorak:eng");
EXPECT_FALSE(observer.last_show_message_);
EXPECT_EQ(2, observer.input_method_changed_count_);
- EXPECT_EQ(2, observer.input_method_property_changed_count_);
+ EXPECT_EQ(2, observer.input_method_menu_item_changed_count_);
manager_->ChangeInputMethod("xkb:us:dvorak:eng");
EXPECT_FALSE(observer.last_show_message_);
@@ -258,9 +266,10 @@ TEST_F(InputMethodManagerImplTest, TestObserver) {
// If the same input method ID is passed, PropertyChanged() is not
// notified.
- EXPECT_EQ(2, observer.input_method_property_changed_count_);
+ EXPECT_EQ(2, observer.input_method_menu_item_changed_count_);
manager_->RemoveObserver(&observer);
+ menu_manager_->RemoveObserver(&observer);
}
TEST_F(InputMethodManagerImplTest, TestGetSupportedInputMethods) {
@@ -635,23 +644,24 @@ TEST_F(InputMethodManagerImplTest, TestXkbSetting) {
EXPECT_EQ("us(colemak)", xkeyboard_->last_layout_);
}
-TEST_F(InputMethodManagerImplTest, TestActivateInputMethodProperty) {
+TEST_F(InputMethodManagerImplTest, TestActivateInputMethodMenuItem) {
const std::string kKey = "key";
- InputMethodPropertyList property_list;
- property_list.push_back(InputMethodProperty(kKey, "label", false, false));
- manager_->SetCurrentInputMethodProperties(property_list);
+ ash::ime::InputMethodMenuItemList menu_list;
+ menu_list.push_back(ash::ime::InputMethodMenuItem(
+ kKey, "label", false, false));
+ menu_manager_->SetCurrentInputMethodMenuItemList(menu_list);
- manager_->ActivateInputMethodProperty(kKey);
+ manager_->ActivateInputMethodMenuItem(kKey);
EXPECT_EQ(kKey, mock_engine_handler_->last_activated_property());
// Key2 is not registered, so activated property should not be changed.
- manager_->ActivateInputMethodProperty("key2");
+ manager_->ActivateInputMethodMenuItem("key2");
EXPECT_EQ(kKey, mock_engine_handler_->last_activated_property());
}
TEST_F(InputMethodManagerImplTest, TestGetCurrentInputMethodProperties) {
InitComponentExtension();
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN);
std::vector<std::string> ids;
@@ -659,26 +669,25 @@ TEST_F(InputMethodManagerImplTest, TestGetCurrentInputMethodProperties) {
ids.push_back(kNaclMozcUsId);
EXPECT_TRUE(manager_->ReplaceEnabledInputMethods(ids));
EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
manager_->ChangeInputMethod(kNaclMozcUsId);
- InputMethodPropertyList current_property_list;
- current_property_list.push_back(InputMethodProperty("key",
- "label",
- false,
- false));
- manager_->SetCurrentInputMethodProperties(current_property_list);
+ ash::ime::InputMethodMenuItemList current_property_list;
+ current_property_list.push_back(ash::ime::InputMethodMenuItem(
+ "key", "label", false, false));
+ menu_manager_->SetCurrentInputMethodMenuItemList(current_property_list);
- ASSERT_EQ(1U, manager_->GetCurrentInputMethodProperties().size());
- EXPECT_EQ("key", manager_->GetCurrentInputMethodProperties().at(0).key);
+ ASSERT_EQ(1U, menu_manager_->GetCurrentInputMethodMenuItemList().size());
+ EXPECT_EQ("key",
+ menu_manager_->GetCurrentInputMethodMenuItemList().at(0).key);
manager_->ChangeInputMethod("xkb:us::eng");
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
}
TEST_F(InputMethodManagerImplTest, TestGetCurrentInputMethodPropertiesTwoImes) {
InitComponentExtension();
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN);
std::vector<std::string> ids;
@@ -686,32 +695,31 @@ TEST_F(InputMethodManagerImplTest, TestGetCurrentInputMethodPropertiesTwoImes) {
ids.push_back(kExt2Engine1Id); // T-Chinese
EXPECT_TRUE(manager_->ReplaceEnabledInputMethods(ids));
EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
- InputMethodPropertyList current_property_list;
- current_property_list.push_back(InputMethodProperty("key-mozc",
- "label",
- false,
- false));
- manager_->SetCurrentInputMethodProperties(current_property_list);
+ ash::ime::InputMethodMenuItemList current_property_list;
+ current_property_list.push_back(ash::ime::InputMethodMenuItem("key-mozc",
+ "label",
+ false,
+ false));
+ menu_manager_->SetCurrentInputMethodMenuItemList(current_property_list);
- ASSERT_EQ(1U, manager_->GetCurrentInputMethodProperties().size());
- EXPECT_EQ("key-mozc", manager_->GetCurrentInputMethodProperties().at(0).key);
+ ASSERT_EQ(1U, menu_manager_->GetCurrentInputMethodMenuItemList().size());
+ EXPECT_EQ("key-mozc",
+ menu_manager_->GetCurrentInputMethodMenuItemList().at(0).key);
manager_->ChangeInputMethod(kExt2Engine1Id);
// Since the IME is changed, the property for mozc Japanese should be hidden.
- EXPECT_TRUE(manager_->GetCurrentInputMethodProperties().empty());
+ EXPECT_TRUE(menu_manager_->GetCurrentInputMethodMenuItemList().empty());
// Asynchronous property update signal from mozc-chewing.
current_property_list.clear();
- current_property_list.push_back(InputMethodProperty("key-chewing",
- "label",
- false,
- false));
- manager_->SetCurrentInputMethodProperties(current_property_list);
- ASSERT_EQ(1U, manager_->GetCurrentInputMethodProperties().size());
+ current_property_list.push_back(ash::ime::InputMethodMenuItem(
+ "key-chewing", "label", false, false));
+ menu_manager_->SetCurrentInputMethodMenuItemList(current_property_list);
+ ASSERT_EQ(1U, menu_manager_->GetCurrentInputMethodMenuItemList().size());
EXPECT_EQ("key-chewing",
- manager_->GetCurrentInputMethodProperties().at(0).key);
+ menu_manager_->GetCurrentInputMethodMenuItemList().at(0).key);
}
TEST_F(InputMethodManagerImplTest, TestNextInputMethod) {
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence.cc b/chrome/browser/chromeos/input_method/input_method_persistence.cc
index b33e256..0ebcaf3 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence.cc
+++ b/chrome/browser/chromeos/input_method/input_method_persistence.cc
@@ -142,9 +142,6 @@ void InputMethodPersistence::InputMethodChanged(
NOTREACHED();
}
-void InputMethodPersistence::InputMethodPropertyChanged(
- InputMethodManager* manager) {}
-
void InputMethodPersistence::OnSessionStateChange(
InputMethodManager::State new_state) {
state_ = new_state;
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence.h b/chrome/browser/chromeos/input_method/input_method_persistence.h
index 9e19921..27fba16 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence.h
+++ b/chrome/browser/chromeos/input_method/input_method_persistence.h
@@ -31,7 +31,6 @@ class InputMethodPersistence : public InputMethodManager::Observer {
// InputMethodManager::Observer overrides.
virtual void InputMethodChanged(InputMethodManager* manager,
bool show_message) OVERRIDE;
- virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE;
private:
InputMethodManager* input_method_manager_;
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_engine.h b/chrome/browser/chromeos/input_method/mock_input_method_engine.h
index b5ad032..39e5647 100644
--- a/chrome/browser/chromeos/input_method/mock_input_method_engine.h
+++ b/chrome/browser/chromeos/input_method/mock_input_method_engine.h
@@ -15,13 +15,18 @@ namespace ui {
class KeyEvent;
} // namespace ui
+namespace ash {
+namespace ime {
+struct InputMethodMenuItem;
+} // namespace ime
+} // namespace ash
+
namespace chromeos {
class CompositionText;
namespace input_method {
class CandidateWindow;
-struct InputMethodProperty;
struct KeyEventHandle;
} // namespace input_method
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_manager.cc b/chrome/browser/chromeos/input_method/mock_input_method_manager.cc
index a4533a2..beb0d28 100644
--- a/chrome/browser/chromeos/input_method/mock_input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/mock_input_method_manager.cc
@@ -91,7 +91,7 @@ void MockInputMethodManager::ChangeInputMethod(
const std::string& input_method_id) {
}
-void MockInputMethodManager::ActivateInputMethodProperty(
+void MockInputMethodManager::ActivateInputMethodMenuItem(
const std::string& key) {
}
@@ -144,15 +144,6 @@ InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const {
return descriptor;
}
-InputMethodPropertyList
-MockInputMethodManager::GetCurrentInputMethodProperties() const {
- return InputMethodPropertyList();
-}
-
-void MockInputMethodManager::SetCurrentInputMethodProperties(
- const InputMethodPropertyList& property_list) {
-}
-
XKeyboard* MockInputMethodManager::GetXKeyboard() {
return &xkeyboard_;
}
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_manager.h b/chrome/browser/chromeos/input_method/mock_input_method_manager.h
index 794db45..b6a757e 100644
--- a/chrome/browser/chromeos/input_method/mock_input_method_manager.h
+++ b/chrome/browser/chromeos/input_method/mock_input_method_manager.h
@@ -44,7 +44,7 @@ class MockInputMethodManager : public InputMethodManager {
virtual bool EnableInputMethod(
const std::string& new_active_input_method_id) OVERRIDE;
virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE;
- virtual void ActivateInputMethodProperty(const std::string& key) OVERRIDE;
+ virtual void ActivateInputMethodMenuItem(const std::string& key) OVERRIDE;
virtual void AddInputMethodExtension(
const std::string& id,
InputMethodEngineInterface* instance) OVERRIDE;
@@ -58,10 +58,6 @@ class MockInputMethodManager : public InputMethodManager {
const ui::Accelerator& accelerator) OVERRIDE;
virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE;
virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE;
- virtual InputMethodPropertyList
- GetCurrentInputMethodProperties() const OVERRIDE;
- virtual void SetCurrentInputMethodProperties(
- const InputMethodPropertyList& property_list) OVERRIDE;
virtual XKeyboard* GetXKeyboard() OVERRIDE;
virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE;
virtual ComponentExtensionIMEManager*
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_controller.cc b/chrome/browser/chromeos/input_method/mode_indicator_controller.cc
index cd8241e..4249fc4 100644
--- a/chrome/browser/chromeos/input_method/mode_indicator_controller.cc
+++ b/chrome/browser/chromeos/input_method/mode_indicator_controller.cc
@@ -92,11 +92,6 @@ void ModeIndicatorController::InputMethodChanged(InputMethodManager* manager,
ShowModeIndicator();
}
-void ModeIndicatorController::InputMethodPropertyChanged(
- InputMethodManager* manager) {
- // Do nothing.
-}
-
void ModeIndicatorController::ShowModeIndicator() {
// TODO(komatsu): When this is permanently enabled by defalut,
// delete command_line.h and chromeos_switches.h from the header
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_controller.h b/chrome/browser/chromeos/input_method/mode_indicator_controller.h
index 9f29041..9023c6c 100644
--- a/chrome/browser/chromeos/input_method/mode_indicator_controller.h
+++ b/chrome/browser/chromeos/input_method/mode_indicator_controller.h
@@ -48,7 +48,6 @@ class ModeIndicatorController
// InputMethodManager::Observer implementation.
virtual void InputMethodChanged(InputMethodManager* manager,
bool show_message) OVERRIDE;
- virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE;
// Show the mode inidicator with the current ime's short name if all
// the conditions are cleared.