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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 11644057: Move BrowserAction out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_ungoop_extension_action
Patch Set: Latest master for CQ Created 7 years, 11 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 | « chrome/renderer/extensions/page_actions_custom_bindings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3d710c509c92f091a7b001e2e1c2f1241ce06295 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,17 @@
#include "ui/gfx/gdi_util.h"
#endif // defined(OS_WIN)
+namespace {
+
+// Explicitly register all ManifestHandlers needed in the utility process.
+void RegisterExtensionManifestHandlers() {
+ extensions::ManifestHandler::Register(
+ extension_manifest_keys::kBrowserAction,
+ new extensions::BrowserActionHandler);
+}
+
+} // namespace
+
namespace chrome {
ChromeContentUtilityClient::ChromeContentUtilityClient() {
@@ -116,6 +130,7 @@ void ChromeContentUtilityClient::OnUnpackExtension(
int creation_flags) {
CHECK(location > extensions::Extension::INVALID);
CHECK(location < extensions::Extension::NUM_LOCATIONS);
+ RegisterExtensionManifestHandlers();
extensions::Unpacker unpacker(
extension_path,
extension_id,
« no previous file with comments | « chrome/renderer/extensions/page_actions_custom_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698