Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: content/renderer/manifest/manifest_parser.h

Issue 2425833002: Parse "purpose" member from Web Manifest (Closed)
Patch Set: patch Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/manifest/manifest_parser.h
diff --git a/content/renderer/manifest/manifest_parser.h b/content/renderer/manifest/manifest_parser.h
index 935593026fd159e69b7777072c139915d3ee6107..409fe946ee3a9cd5897da5ae8c9acc4375375dd6 100644
--- a/content/renderer/manifest/manifest_parser.h
+++ b/content/renderer/manifest/manifest_parser.h
@@ -131,6 +131,15 @@ class CONTENT_EXPORT ManifestParser {
// by gfx::Size(0, 0).
std::vector<gfx::Size> ParseIconSizes(const base::DictionaryValue& icon);
+ // Parses the 'purpose' field of an icon, as defined in:
+ // https://w3c.github.io/manifest/#dfn-steps-for-processing-a-purpose-member-of-an-image
+ // Returns a vector of Manifest::Icon::IconPurpose with the successfully
+ // parsed icon purposes, an empty vector if the field was not present or of
pkotwicz 2016/10/18 14:13:56 Nit: "or of type" -> "or not of type"
F 2016/10/18 15:34:46 Done.
+ // type "string", or a vector containing Manifest::Icon::IconPurpose::Any for
pkotwicz 2016/10/18 14:13:56 Nit: "or a vector" -> "and a vector"
F 2016/10/18 15:34:46 Done.
+ // all other parsing exceptions.
+ std::vector<Manifest::Icon::IconPurpose> ParseIconPurpose(
+ const base::DictionaryValue& icon);
+
// Parses the 'icons' field of a Manifest, as defined in:
// https://w3c.github.io/manifest/#dfn-steps-for-processing-an-array-of-images
// Returns a vector of Manifest::Icon with the successfully parsed icons, if

Powered by Google App Engine
This is Rietveld 408576698