Chromium Code Reviews| Index: chrome/utility/chrome_content_utility_client.cc |
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc |
| index e372ebf76575309c91f351261406ffaa0eb4356f..ac7404fcddca68613bb4dc35d7da9bdfacbc0cbc 100644 |
| --- a/chrome/utility/chrome_content_utility_client.cc |
| +++ b/chrome/utility/chrome_content_utility_client.cc |
| @@ -17,8 +17,11 @@ |
| #include "chrome/common/child_process_logging.h" |
| #include "chrome/common/chrome_paths.h" |
| #include "chrome/common/chrome_utility_messages.h" |
| +#include "chrome/common/extensions/api/extension_action/browser_action_handler.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_l10n_util.h" |
| +#include "chrome/common/extensions/extension_manifest_constants.h" |
| +#include "chrome/common/extensions/manifest_handler.h" |
| #include "chrome/common/extensions/unpacker.h" |
| #include "chrome/common/extensions/update_manifest.h" |
| #include "chrome/common/web_resource/web_resource_unpacker.h" |
| @@ -42,6 +45,18 @@ |
| #include "ui/gfx/gdi_util.h" |
| #endif // defined(OS_WIN) |
| +namespace { |
| + |
| +// Explicitly register all ManifestHandlers, since the subprocess won't have the |
|
Yoyo Zhou
2012/12/28 05:19:59
Comment should read "all ManifestHandlers needed i
Devlin
2012/12/28 20:25:36
Done.
Yoyo Zhou
2012/12/28 21:35:33
I meant you could also remove the "since..." bit.
Devlin
2013/01/23 23:48:01
Done.
|
| +// same ManifestHandlerRegistry. |
| +void RegisterManifestHandlers() { |
|
Yoyo Zhou
2012/12/28 05:19:59
RegisterExtensionManifestHandlers is better.
Devlin
2012/12/28 20:25:36
Done.
|
| + extensions::ManifestHandler::Register( |
| + extension_manifest_keys::kBrowserAction, |
| + new extensions::BrowserActionHandler); |
| +} |
| + |
| +} // namespace |
| + |
| namespace chrome { |
| ChromeContentUtilityClient::ChromeContentUtilityClient() { |
| @@ -116,6 +131,7 @@ void ChromeContentUtilityClient::OnUnpackExtension( |
| int creation_flags) { |
| CHECK(location > extensions::Extension::INVALID); |
| CHECK(location < extensions::Extension::NUM_LOCATIONS); |
| + RegisterManifestHandlers(); |
| extensions::Unpacker unpacker( |
| extension_path, |
| extension_id, |