| 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> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-name-member | 83 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-name-member |
| 84 // Returns the parsed string if any, a null string if the parsing failed. | 84 // Returns the parsed string if any, a null string if the parsing failed. |
| 85 base::NullableString16 ParseName(const base::DictionaryValue& dictionary); | 85 base::NullableString16 ParseName(const base::DictionaryValue& dictionary); |
| 86 | 86 |
| 87 // Parses the 'short_name' field of the manifest, as defined in: | 87 // Parses the 'short_name' field of the manifest, as defined in: |
| 88 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-short-name-memb
er | 88 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-short-name-memb
er |
| 89 // Returns the parsed string if any, a null string if the parsing failed. | 89 // Returns the parsed string if any, a null string if the parsing failed. |
| 90 base::NullableString16 ParseShortName( | 90 base::NullableString16 ParseShortName( |
| 91 const base::DictionaryValue& dictionary); | 91 const base::DictionaryValue& dictionary); |
| 92 | 92 |
| 93 // Parses the 'scope' field of the manifest, as defined in: |
| 94 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-scope-member |
| 95 // Returns the parsed GURL if any, an empty GURL if the parsing failed. |
| 96 GURL ParseScope(const base::DictionaryValue& dictionary, |
| 97 const GURL& start_url); |
| 98 |
| 93 // Parses the 'start_url' field of the manifest, as defined in: | 99 // Parses the 'start_url' field of the manifest, as defined in: |
| 94 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-start_url-membe
r | 100 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-start_url-membe
r |
| 95 // Returns the parsed GURL if any, an empty GURL if the parsing failed. | 101 // Returns the parsed GURL if any, an empty GURL if the parsing failed. |
| 96 GURL ParseStartURL(const base::DictionaryValue& dictionary); | 102 GURL ParseStartURL(const base::DictionaryValue& dictionary); |
| 97 | 103 |
| 98 // Parses the 'display' field of the manifest, as defined in: | 104 // Parses the 'display' field of the manifest, as defined in: |
| 99 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-display-member | 105 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-display-member |
| 100 // Returns the parsed DisplayMode if any, WebDisplayModeUndefined if the | 106 // Returns the parsed DisplayMode if any, WebDisplayModeUndefined if the |
| 101 // parsing failed. | 107 // parsing failed. |
| 102 blink::WebDisplayMode ParseDisplay(const base::DictionaryValue& dictionary); | 108 blink::WebDisplayMode ParseDisplay(const base::DictionaryValue& dictionary); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool failed_; | 199 bool failed_; |
| 194 Manifest manifest_; | 200 Manifest manifest_; |
| 195 std::vector<ManifestDebugInfo::Error> errors_; | 201 std::vector<ManifestDebugInfo::Error> errors_; |
| 196 | 202 |
| 197 DISALLOW_COPY_AND_ASSIGN(ManifestParser); | 203 DISALLOW_COPY_AND_ASSIGN(ManifestParser); |
| 198 }; | 204 }; |
| 199 | 205 |
| 200 } // namespace content | 206 } // namespace content |
| 201 | 207 |
| 202 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 208 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
| OLD | NEW |