OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| 6 #define CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| 7 |
| 8 #include "content/public/renderer/manifest_parser.h" |
| 9 |
| 10 // ChromeManifestParser is an extension of the Manifest parser handling |
| 11 // properties specific to Chrome and unknown to the content/ layer. |
| 12 class ChromeManifestParser : public content::ManifestParser { |
| 13 public: |
| 14 ChromeManifestParser(); |
| 15 ~ChromeManifestParser() override; |
| 16 |
| 17 protected: |
| 18 void ParseExtensionPoint(const base::DictionaryValue& dictionary) override; |
| 19 |
| 20 private: |
| 21 // Parses the 'gcm_sender_id' field of the manifest. |
| 22 // This is a proprietary extension of the Web Manifest specification. |
| 23 // Returns the parsed string if any, a null string if the parsing failed. |
| 24 base::NullableString16 ParseGCMSenderID( |
| 25 const base::DictionaryValue& dictionary); |
| 26 |
| 27 // Parses the 'gcm_user_visible_only' field of the manifest. |
| 28 // This is a proprietary extension of the Web Manifest specification. |
| 29 // Returns true iff the string could be parsed as the boolean true. |
| 30 bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary); |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(ChromeManifestParser); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
OLD | NEW |