Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/nullable_string16.h" | 13 #include "base/strings/nullable_string16.h" |
| 14 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/public/common/manifest.h" | 16 #include "content/public/common/manifest.h" |
| 17 #include "content/renderer/manifest/manifest_debug_info.h" | 17 #include "content/renderer/manifest/manifest_debug_info.h" |
| 18 | 18 |
| 19 class GURL; | 19 class GURL; |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class DictionaryValue; | 22 class DictionaryValue; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 std::vector<gfx::Size> ParseIconSizesHTML(const base::string16& sizes_str16); | |
|
mlamouri (slow - plz ping)
2016/06/10 10:54:58
Not a big fan of re-using the parsing algorithm of
Zhiqiang Zhang (Slow)
2016/06/14 13:16:17
Rebased onto the common parser in Blink.
| |
| 28 | |
| 27 // ManifestParser handles the logic of parsing the Web Manifest from a string. | 29 // ManifestParser handles the logic of parsing the Web Manifest from a string. |
| 28 // It implements: | 30 // It implements: |
| 29 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-manifest | 31 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-manifest |
| 30 class CONTENT_EXPORT ManifestParser { | 32 class CONTENT_EXPORT ManifestParser { |
| 31 public: | 33 public: |
| 32 ManifestParser(const base::StringPiece& data, | 34 ManifestParser(const base::StringPiece& data, |
| 33 const GURL& manifest_url, | 35 const GURL& manifest_url, |
| 34 const GURL& document_url); | 36 const GURL& document_url); |
| 35 ~ManifestParser(); | 37 ~ManifestParser(); |
| 36 | 38 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 bool failed_; | 195 bool failed_; |
| 194 Manifest manifest_; | 196 Manifest manifest_; |
| 195 std::vector<ManifestDebugInfo::Error> errors_; | 197 std::vector<ManifestDebugInfo::Error> errors_; |
| 196 | 198 |
| 197 DISALLOW_COPY_AND_ASSIGN(ManifestParser); | 199 DISALLOW_COPY_AND_ASSIGN(ManifestParser); |
| 198 }; | 200 }; |
| 199 | 201 |
| 200 } // namespace content | 202 } // namespace content |
| 201 | 203 |
| 202 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 204 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| OLD | NEW |