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

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 12091115: Allow manifest handlers to declare keys they depend on that must be parsed before them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcronin Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_apitest.cc ('k') | chrome/browser/extensions/api/omnibox/omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698