| Index: chrome/browser/chromeos/extensions/input_method_event_router.cc
|
| diff --git a/chrome/browser/chromeos/extensions/input_method_event_router.cc b/chrome/browser/chromeos/extensions/input_method_event_router.cc
|
| index b7202b8b910dc47d40bff90be651d5bd88bc8da9..b6c070e140f629e1af1f9b8f1783a5b0e49ccbe7 100644
|
| --- a/chrome/browser/chromeos/extensions/input_method_event_router.cc
|
| +++ b/chrome/browser/chromeos/extensions/input_method_event_router.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/json/json_writer.h"
|
| #include "base/values.h"
|
| +#include "chrome/browser/chromeos/extensions/input_method_api.h"
|
| #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
|
| #include "chrome/browser/chromeos/web_socket_proxy_controller.h"
|
| #include "chrome/browser/extensions/event_names.h"
|
| @@ -16,13 +17,6 @@
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/profiles/profile.h"
|
|
|
| -namespace {
|
| -
|
| -// Prefix, which is used by XKB.
|
| -const char kXkbPrefix[] = "xkb:";
|
| -
|
| -} // namespace
|
| -
|
| namespace chromeos {
|
|
|
| ExtensionInputMethodEventRouter::ExtensionInputMethodEventRouter() {
|
| @@ -45,7 +39,8 @@ void ExtensionInputMethodEventRouter::InputMethodChanged(
|
|
|
| scoped_ptr<ListValue> args(new ListValue());
|
| StringValue *input_method_name = new StringValue(
|
| - GetInputMethodForXkb(manager->GetCurrentInputMethod().id()));
|
| + extensions::InputMethodAPI::GetInputMethodForXkb(
|
| + manager->GetCurrentInputMethod().id()));
|
| args->Append(input_method_name);
|
|
|
| // The router will only send the event to extensions that are listening.
|
| @@ -56,11 +51,4 @@ void ExtensionInputMethodEventRouter::InputMethodChanged(
|
| BroadcastEvent(event.Pass());
|
| }
|
|
|
| -std::string ExtensionInputMethodEventRouter::GetInputMethodForXkb(
|
| - const std::string& xkb_id) {
|
| - size_t prefix_length = std::string(kXkbPrefix).length();
|
| - DCHECK(xkb_id.substr(0, prefix_length) == kXkbPrefix);
|
| - return xkb_id.substr(prefix_length);
|
| -}
|
| -
|
| } // namespace chromeos
|
|
|