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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 std::vector<Manifest::Icon::IconPurpose> ParseIconPurpose( | 139 std::vector<Manifest::Icon::IconPurpose> ParseIconPurpose( |
140 const base::DictionaryValue& icon); | 140 const base::DictionaryValue& icon); |
141 | 141 |
142 // Parses the 'icons' field of a Manifest, as defined in: | 142 // Parses the 'icons' field of a Manifest, as defined in: |
143 // https://w3c.github.io/manifest/#dfn-steps-for-processing-an-array-of-images | 143 // https://w3c.github.io/manifest/#dfn-steps-for-processing-an-array-of-images |
144 // Returns a vector of Manifest::Icon with the successfully parsed icons, if | 144 // Returns a vector of Manifest::Icon with the successfully parsed icons, if |
145 // any. An empty vector if the field was not present or empty. | 145 // any. An empty vector if the field was not present or empty. |
146 std::vector<Manifest::Icon> ParseIcons( | 146 std::vector<Manifest::Icon> ParseIcons( |
147 const base::DictionaryValue& dictionary); | 147 const base::DictionaryValue& dictionary); |
148 | 148 |
149 // Parses the 'url_template' field of a Share Target, as defined in: | |
150 // https://github.com/WICG/web-share-target/blob/master/docs/interface.md | |
constantina
2017/01/18 07:52:18
Documentation doesn't reference dictionary structu
| |
151 // Returns the parsed string if any, or a null string if the field was not | |
152 // present, or didn't contain a string. | |
153 base::NullableString16 ParseShareTargetURLTemplate( | |
nasko
2017/01/18 23:39:13
nit: Acronyms (such as URL) need to only upper cas
constantina
2017/01/19 00:07:32
Capitalised every letter for consistency with the
| |
154 const base::DictionaryValue& share_target); | |
155 | |
156 // Parses the 'share_target' field of a Manifest, as defined in: | |
157 // https://github.com/WICG/web-share-target/blob/master/docs/interface.md | |
158 // Returns the parsed Share Target. The returned Share Target is null if | |
nasko
2017/01/18 23:39:13
nit: "target" as commented in another file with si
constantina
2017/01/19 00:07:32
Done.
| |
159 // the field didn't exist, parsing failed, or it was empty. | |
160 Manifest::ShareTarget ParseShareTarget( | |
161 const base::DictionaryValue& dictionary); | |
162 | |
149 // Parses the 'platform' field of a related application, as defined in: | 163 // Parses the 'platform' field of a related application, as defined in: |
150 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-platform-membe r-of-an-application | 164 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-platform-membe r-of-an-application |
151 // Returns the parsed string if any, a null string if the parsing failed. | 165 // Returns the parsed string if any, a null string if the parsing failed. |
152 base::NullableString16 ParseRelatedApplicationPlatform( | 166 base::NullableString16 ParseRelatedApplicationPlatform( |
153 const base::DictionaryValue& application); | 167 const base::DictionaryValue& application); |
154 | 168 |
155 // Parses the 'url' field of a related application, as defined in: | 169 // Parses the 'url' field of a related application, as defined in: |
156 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-url-member-of- an-application | 170 // https://w3c.github.io/manifest/#dfn-steps-for-processing-the-url-member-of- an-application |
157 // Returns the paresed GURL if any, an empty GURL if the parsing failed. | 171 // Returns the paresed GURL if any, an empty GURL if the parsing failed. |
158 GURL ParseRelatedApplicationURL(const base::DictionaryValue& application); | 172 GURL ParseRelatedApplicationURL(const base::DictionaryValue& application); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 bool failed_; | 221 bool failed_; |
208 Manifest manifest_; | 222 Manifest manifest_; |
209 std::vector<ManifestDebugInfo::Error> errors_; | 223 std::vector<ManifestDebugInfo::Error> errors_; |
210 | 224 |
211 DISALLOW_COPY_AND_ASSIGN(ManifestParser); | 225 DISALLOW_COPY_AND_ASSIGN(ManifestParser); |
212 }; | 226 }; |
213 | 227 |
214 } // namespace content | 228 } // namespace content |
215 | 229 |
216 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ | 230 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ |
OLD | NEW |