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

Unified Diff: chrome/common/extensions/web_intents_handler.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/web_intents_handler.cc
diff --git a/chrome/common/extensions/web_intents_handler.cc b/chrome/common/extensions/web_intents_handler.cc
index e322f8d747725dd751fb21dd5b9f86c06b28af6d..e8af879c4ee7c4a4a14adee0412474c763907bcd 100644
--- a/chrome/common/extensions/web_intents_handler.cc
+++ b/chrome/common/extensions/web_intents_handler.cc
@@ -9,6 +9,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
#include "extensions/common/error_utils.h"
@@ -96,7 +97,7 @@ bool LoadWebIntentsAction(const std::string& action_name,
}
service.service_url = service_url;
} else if (extension->is_platform_app()) {
- service.service_url = extension->GetBackgroundURL();
+ service.service_url = BackgroundInfo::GetBackgroundURL(extension);
} else {
// We do not allow absolute intent URLs in non-hosted apps.
if (service_url.is_valid()) {
@@ -208,4 +209,14 @@ bool WebIntentsHandler::Parse(Extension* extension, string16* error) {
return true;
}
+const std::vector<std::string>& WebIntentsHandler::PrerequisiteKeys() const {
Yoyo Zhou 2013/02/15 02:28:25 I went to all this effort and then found out WebIn
+ std::vector<std::string> prereq_keys;
+ prereq_keys.push_back(keys::kBackgroundPage);
+ prereq_keys.push_back(keys::kBackgroundPageLegacy);
+ prereq_keys.push_back(keys::kBackgroundScripts);
+ prereq_keys.push_back(keys::kPlatformAppBackgroundPage);
+ prereq_keys.push_back(keys::kPlatformAppBackgroundScripts);
+ return prereq_keys;
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698