Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chrome/browser/chromeos/input_method/input_method_engine.cc

Issue 150203015: Split out InputMethodMenuManager from InputMethodManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_engine.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
index 200e6816835f9b724cd01ebd4e7e64aa717214ba..2a55a13f1e03bb10fa9722fdffc25854e683aa15 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"
@@ -371,19 +373,16 @@ 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::Get()->SetCurrentInputMethodMenuItemList(
+ menu_item_list);
return true;
}
@@ -583,9 +582,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) {

Powered by Google App Engine
This is Rietveld 408576698