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

Unified Diff: extensions/common/api/declarative/declarative_manifest_handler.h

Issue 1158693006: Create a mechanism define declarative rules via the extension manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add thread safety to extensionregistry notifications Created 5 years, 6 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: extensions/common/api/declarative/declarative_manifest_handler.h
diff --git a/extensions/common/api/declarative/declarative_manifest_handler.h b/extensions/common/api/declarative/declarative_manifest_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..f555bfffcaea4909d55f17d038c91f02d99500db
--- /dev/null
+++ b/extensions/common/api/declarative/declarative_manifest_handler.h
@@ -0,0 +1,38 @@
+// Copyright 2015 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 EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_HANDLER_H_
+#define EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_HANDLER_H_
+
+#include <string>
+#include <vector>
+
+#include "extensions/common/manifest_handler.h"
+
+namespace extensions {
+class Extension;
+class ManifestPermission;
+}
+
+namespace extensions {
+
+// Parses the "event_rules" manifest key.
+class DeclarativeManifestHandler : public ManifestHandler {
+ public:
+ DeclarativeManifestHandler();
+ ~DeclarativeManifestHandler() override;
+
+ // ManifestHandler overrides.
+ bool Parse(Extension* extension, base::string16* error) override;
+
+ private:
+ // ManifestHandler overrides.
+ const std::vector<std::string> Keys() const override;
+
+ DISALLOW_COPY_AND_ASSIGN(DeclarativeManifestHandler);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698