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

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

Issue 2425833002: Parse "purpose" member from Web Manifest (Closed)
Patch Set: Fix Created 4 years 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
« no previous file with comments | « content/public/common/manifest.h ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3487b81b40fcfb7d3ed5e67727d0f6ee2ca49dbb 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 not
+ // of type "string", and a vector containing Manifest::Icon::IconPurpose::Any
+ // for 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
« no previous file with comments | « content/public/common/manifest.h ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698