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

Unified Diff: content/public/common/manifest.h

Issue 919293002: Add related_applications field to manifest parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 8 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
« no previous file with comments | « content/common/manifest_manager_messages.h ('k') | content/public/common/manifest.cc » ('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 d221c8ca1cf8f11dc3ce8ed709dfaa91d69862ca..59948c0b8ef513131f3594822758324f953a715f 100644
--- a/content/public/common/manifest.h
+++ b/content/public/common/manifest.h
@@ -54,6 +54,26 @@ 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. This can be any
+ // string, and is interpreted by the consumer of the object. Empty if the
+ // parsing failed.
+ base::NullableString16 platform;
+
+ // URL at which the application can be found. One of |url| and |id| must be
+ // present. 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. One of
+ // |url| and |id| must be present. Empty if the parsing failed or the field
+ // was not present.
+ base::NullableString16 id;
+ };
+
Manifest();
~Manifest();
@@ -82,6 +102,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 +130,4 @@ struct CONTENT_EXPORT Manifest {
} // namespace content
-#endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_
+#endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_
« no previous file with comments | « content/common/manifest_manager_messages.h ('k') | content/public/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698