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

Unified Diff: content/public/common/manifest.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/public/common/manifest.h
diff --git a/content/public/common/manifest.h b/content/public/common/manifest.h
index 8e6ce266ef2e9fc53efbdec4ad9cca8aa6a508a6..98cd74f14f7a9fe768da32f5c5f8bf5cbf71b55e 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,10 @@ 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". Contains
pkotwicz 2016/10/18 14:13:56 Nit: "Contains" -> "Defaults to"
F 2016/10/18 15:34:46 Done.
+ // IconPurpose::ANY for all other parsing exceptions.
+ std::vector<IconPurpose> purpose;
pkotwicz 2016/10/18 14:13:56 I think that "purposes" is a better name because "
F 2016/10/18 15:34:46 I agree that "purposes" is a much better name. But
pkotwicz 2016/10/18 17:16:12 sounds good
};
// Structure representing a related application.
« no previous file with comments | « no previous file | content/renderer/manifest/manifest_parser.h » ('j') | content/renderer/manifest/manifest_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698