Index: content/public/common/manifest.h |
diff --git a/content/public/common/manifest.h b/content/public/common/manifest.h |
index d221c8ca1cf8f11dc3ce8ed709dfaa91d69862ca..b0e2650e52f0e911b38f5fccb9f56435dcac7c19 100644 |
--- a/content/public/common/manifest.h |
+++ b/content/public/common/manifest.h |
@@ -27,6 +27,11 @@ struct CONTENT_EXPORT Manifest { |
DISPLAY_MODE_BROWSER |
}; |
+ enum RelatedApplicationPlatform { |
+ RELATED_APPLICATION_PLATFORM_UNSPECIFIED, |
+ RELATED_APPLICATION_PLATFORM_PLAY, |
+ }; |
mlamouri (slow - plz ping)
2015/04/10 09:49:44
Shouldn't we have the embedder decide which platfo
benwells
2015/04/15 06:45:22
OK, makes sense. Done.
|
+ |
// Structure representing an icon as per the Manifest specification, see: |
// http://w3c.github.io/manifest/#dfn-icon-object |
struct CONTENT_EXPORT Icon { |
@@ -54,6 +59,22 @@ struct CONTENT_EXPORT Manifest { |
static const double kDefaultDensity; |
}; |
+ // Structure representing a related application. |
+ struct CONTENT_EXPORT RelatedApplication { |
+ RelatedApplication(); |
+ ~RelatedApplication(); |
+ |
+ // The platform on which the application can be found. |
+ RelatedApplicationPlatform platform; |
+ |
+ // URL at which the application can be found. Empty if the parsing failed or |
+ // the field was not present. |
+ GURL url; |
+ |
+ // An id which is used to represent the application on the platform. |
+ base::NullableString16 id; |
mlamouri (slow - plz ping)
2015/04/10 09:49:44
Could you add a comment saying that if the |id| is
benwells
2015/04/15 06:45:22
Done.
|
+ }; |
+ |
Manifest(); |
~Manifest(); |
@@ -82,6 +103,16 @@ struct CONTENT_EXPORT Manifest { |
// icons inside the JSON array were invalid. |
std::vector<Icon> icons; |
+ // Empty if the parsing failed, the field was not present, empty or all the |
+ // applications inside the array were invalid. The order of the array |
+ // indicates the priority of the application to use. |
+ std::vector<RelatedApplication> related_applications; |
+ |
+ // A boolean that is used as a hint for the user agent to say that related |
+ // applications should be preferred over the web application. False if missing |
+ // or there is a parsing failure. |
+ bool prefer_related_applications; |
+ |
// This is a proprietary extension of the web Manifest, double-check that it |
// is okay to use this entry. |
// Null if parsing failed or the field was not present. |
@@ -100,4 +131,4 @@ struct CONTENT_EXPORT Manifest { |
} // namespace content |
-#endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ |
+#endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ |