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

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

Issue 11741014: Move 'intents' parsing out of Extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed special_storage_policy unittest 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
Index: chrome/common/extensions/web_intents_handler.h
diff --git a/chrome/common/extensions/web_intents_handler.h b/chrome/common/extensions/web_intents_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..d195b311d35043b6e68a322127d950aaa3b55df1
--- /dev/null
+++ b/chrome/common/extensions/web_intents_handler.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_
+#define CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_
+
+#include <string>
+
+#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/manifest_handler.h"
+
+namespace webkit_glue {
+struct WebIntentServiceData;
+}
+
+namespace extensions {
+
+typedef std::vector<webkit_glue::WebIntentServiceData> WebIntentServiceDataList;
+
+// A structure to hold the parsed web intent service data list
+// that may be specified in the manifest of an extension using
+// "intents" key.
+struct WebIntentsInfo : public Extension::ManifestData {
+ // Define out of line constructor/destructor to please Clang.
+ WebIntentsInfo();
+ virtual ~WebIntentsInfo();
+
+ static const WebIntentServiceDataList& GetIntentsServices(
+ const Extension* extension);
+
+ // List of intents services that the extension provides, if any.
+ WebIntentServiceDataList intents_services_;
+};
+
+// Parses the "intents" manifest key.
+class WebIntentsHandler : public ManifestHandler {
+ public:
+ WebIntentsHandler();
+ virtual ~WebIntentsHandler();
+
+ virtual bool Parse(const base::Value* value,
+ Extension* extension,
+ string16* error) OVERRIDE;
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698