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

Unified Diff: chrome/browser/chromeos/extensions/input_method_api.cc

Issue 190033005: [IME] Removes the duplicated IMEs in chrome://settings/languages, and support async component IMEs … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make test green. Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/input_method_api.cc
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc
index 4f7ef130a0acbbdb20aa3225562130eb9d3efc91..19ba748d19445803f9e5fcf7c6610ed6c8aa3c0a 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.cc
+++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/chromeos/extensions/input_method_event_router.h"
#include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
#include "chrome/browser/extensions/event_names.h"
+#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/input_method_manager.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_system.h"
@@ -76,8 +77,11 @@ InputMethodAPI::~InputMethodAPI() {
// static
std::string InputMethodAPI::GetInputMethodForXkb(const std::string& xkb_id) {
- size_t prefix_length = std::string(kXkbPrefix).length();
- DCHECK(xkb_id.substr(0, prefix_length) == kXkbPrefix);
+ std::string xkb_prefix =
+ chromeos::extension_ime_util::GetInputMethodIDByKeyboardLayout(
+ kXkbPrefix);
+ size_t prefix_length = xkb_prefix.length();
+ DCHECK(xkb_id.substr(0, prefix_length) == xkb_prefix);
return xkb_id.substr(prefix_length);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698