| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| 6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| 7 | 7 |
| 8 #include "base/strings/nullable_string16.h" | 8 #include "base/strings/nullable_string16.h" |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-prefer_related
_applications-member | 154 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-prefer_related
_applications-member |
| 155 // returns true iff the field could be parsed as the boolean true. | 155 // returns true iff the field could be parsed as the boolean true. |
| 156 bool ParsePreferRelatedApplications(const base::DictionaryValue& dictionary); | 156 bool ParsePreferRelatedApplications(const base::DictionaryValue& dictionary); |
| 157 | 157 |
| 158 // Parses the 'gcm_sender_id' field of the manifest. | 158 // Parses the 'gcm_sender_id' field of the manifest. |
| 159 // This is a proprietary extension of the Web Manifest specification. | 159 // This is a proprietary extension of the Web Manifest specification. |
| 160 // Returns the parsed string if any, a null string if the parsing failed. | 160 // Returns the parsed string if any, a null string if the parsing failed. |
| 161 base::NullableString16 ParseGCMSenderID( | 161 base::NullableString16 ParseGCMSenderID( |
| 162 const base::DictionaryValue& dictionary); | 162 const base::DictionaryValue& dictionary); |
| 163 | 163 |
| 164 // Parses the 'gcm_user_visible_only' field of the manifest. | |
| 165 // This is a proprietary extension of the Web Manifest specification. | |
| 166 // Returns true iff the string could be parsed as the boolean true. | |
| 167 bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary); | |
| 168 | |
| 169 const base::StringPiece& data_; | 164 const base::StringPiece& data_; |
| 170 GURL manifest_url_; | 165 GURL manifest_url_; |
| 171 GURL document_url_; | 166 GURL document_url_; |
| 172 | 167 |
| 173 bool failed_; | 168 bool failed_; |
| 174 Manifest manifest_; | 169 Manifest manifest_; |
| 175 std::vector<std::string> errors_; | 170 std::vector<std::string> errors_; |
| 176 | 171 |
| 177 DISALLOW_COPY_AND_ASSIGN(ManifestParser); | 172 DISALLOW_COPY_AND_ASSIGN(ManifestParser); |
| 178 }; | 173 }; |
| 179 | 174 |
| 180 } // namespace content | 175 } // namespace content |
| 181 | 176 |
| 182 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 177 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| OLD | NEW |