Index: chrome/renderer/manifest/manifest_parser.h |
diff --git a/chrome/renderer/manifest/manifest_parser.h b/chrome/renderer/manifest/manifest_parser.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4bd8db39116d2e447be720ad5dc3561396a82a63 |
--- /dev/null |
+++ b/chrome/renderer/manifest/manifest_parser.h |
@@ -0,0 +1,35 @@ |
+// 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 CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
+#define CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
+ |
+#include "content/public/renderer/manifest_parser.h" |
+ |
+// ChromeManifestParser is an extension of the Manifest parser handling |
+// properties specific to Chrome and unknown to the content/ layer. |
+class ChromeManifestParser : public content::ManifestParser { |
+ public: |
+ ChromeManifestParser(); |
+ ~ChromeManifestParser() override; |
+ |
+ protected: |
+ void ParseExtensionPoint(const base::DictionaryValue& dictionary) override; |
+ |
+ private: |
+ // Parses the 'gcm_sender_id' field of the manifest. |
+ // This is a proprietary extension of the Web Manifest specification. |
+ // Returns the parsed string if any, a null string if the parsing failed. |
+ base::NullableString16 ParseGCMSenderID( |
+ const base::DictionaryValue& dictionary); |
+ |
+ // Parses the 'gcm_user_visible_only' field of the manifest. |
+ // This is a proprietary extension of the Web Manifest specification. |
+ // Returns true iff the string could be parsed as the boolean true. |
+ bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeManifestParser); |
+}; |
+ |
+#endif // CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |