| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" | 5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 InputImeEventRouter::GetInstance()->OnKeyEventHandled( | 834 InputImeEventRouter::GetInstance()->OnKeyEventHandled( |
| 835 extension_id(), request_id_str, handled); | 835 extension_id(), request_id_str, handled); |
| 836 | 836 |
| 837 return true; | 837 return true; |
| 838 } | 838 } |
| 839 #endif | 839 #endif |
| 840 | 840 |
| 841 InputImeAPI::InputImeAPI(Profile* profile) | 841 InputImeAPI::InputImeAPI(Profile* profile) |
| 842 : profile_(profile) { | 842 : profile_(profile) { |
| 843 ManifestHandler::Register(extension_manifest_keys::kInputComponents, | 843 ManifestHandler::Register(extension_manifest_keys::kInputComponents, |
| 844 new InputComponentsHandler); | 844 make_linked_ptr(new InputComponentsHandler)); |
| 845 | 845 |
| 846 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 846 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
| 847 content::Source<Profile>(profile)); | 847 content::Source<Profile>(profile)); |
| 848 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 848 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
| 849 content::Source<Profile>(profile)); | 849 content::Source<Profile>(profile)); |
| 850 | 850 |
| 851 ExtensionFunctionRegistry* registry = | 851 ExtensionFunctionRegistry* registry = |
| 852 ExtensionFunctionRegistry::GetInstance(); | 852 ExtensionFunctionRegistry::GetInstance(); |
| 853 registry->RegisterFunction<SetCompositionFunction>(); | 853 registry->RegisterFunction<SetCompositionFunction>(); |
| 854 registry->RegisterFunction<ClearCompositionFunction>(); | 854 registry->RegisterFunction<ClearCompositionFunction>(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 input_ime_event_router()->UnregisterAllImes(profile_, extension->id()); | 901 input_ime_event_router()->UnregisterAllImes(profile_, extension->id()); |
| 902 } | 902 } |
| 903 } | 903 } |
| 904 } | 904 } |
| 905 | 905 |
| 906 InputImeEventRouter* InputImeAPI::input_ime_event_router() { | 906 InputImeEventRouter* InputImeAPI::input_ime_event_router() { |
| 907 return InputImeEventRouter::GetInstance(); | 907 return InputImeEventRouter::GetInstance(); |
| 908 } | 908 } |
| 909 | 909 |
| 910 } // namespace extensions | 910 } // namespace extensions |
| OLD | NEW |