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

Unified Diff: content/public/common/manifest.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 | « no previous file | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/manifest.h
diff --git a/content/public/common/manifest.h b/content/public/common/manifest.h
index 8e6ce266ef2e9fc53efbdec4ad9cca8aa6a508a6..d558d66978673f9ce20c4b0284a57818adda63ff 100644
--- a/content/public/common/manifest.h
+++ b/content/public/common/manifest.h
@@ -27,6 +27,11 @@ struct CONTENT_EXPORT Manifest {
// Structure representing an icon as per the Manifest specification, see:
// http://w3c.github.io/manifest/#dfn-icon-object
struct CONTENT_EXPORT Icon {
+ enum IconPurpose {
+ ANY = 0,
+ BADGE,
+ };
+
Icon();
Icon(const Icon& other);
~Icon();
@@ -46,6 +51,11 @@ struct CONTENT_EXPORT Manifest {
// Empty if the parsing failed, the field was not present or empty.
// The special value "any" is represented by gfx::Size(0, 0).
std::vector<gfx::Size> sizes;
+
+ // Empty if the field was not present or not of type "string". Defaults to
+ // a vector with a single value, IconPurpose::ANY, for all other parsing
+ // exceptions.
+ std::vector<IconPurpose> purpose;
};
// Structure representing a related application.
« no previous file with comments | « no previous file | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698