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

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: Do IPC stuff Created 5 years, 10 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 95180e21f7330e07d44c77a322d1e5bfa6114d00..0edb6f18cf0879fade56aa0bcacabe6c624ff3a8 100644
--- a/content/public/common/manifest.h
+++ b/content/public/common/manifest.h
@@ -27,6 +27,12 @@ struct CONTENT_EXPORT Manifest {
DISPLAY_MODE_BROWSER
};
+ enum ChromeRelatedApplicationPlatform {
+ CHROME_RELATED_APPLICATION_PLATFORM_UNSPECIFIED,
+ CHROME_RELATED_APPLICATION_PLATFORM_ANDROID,
+ CHROME_RELATED_APPLICATION_PLATFORM_WEB,
+ };
+
// Structure representing an icon as per the Manifest specification, see:
// http://w3c.github.io/manifest/#dfn-icon-object
struct CONTENT_EXPORT Icon {
@@ -54,6 +60,19 @@ struct CONTENT_EXPORT Manifest {
static const double kDefaultDensity;
};
+ // Structure representing a related application.
+ struct CONTENT_EXPORT ChromeRelatedApplication {
+ ChromeRelatedApplication();
+ ~ChromeRelatedApplication();
+
+ // The platform the application runs on.
+ ChromeRelatedApplicationPlatform platform;
+
+ // Platform specific key identifying the application. May not be present
+ // for some platforms (e.g. WEB).
+ base::NullableString16 id;
+ };
+
Manifest();
~Manifest();
@@ -92,6 +111,10 @@ struct CONTENT_EXPORT Manifest {
// False if parsing failed or the field was not present.
bool gcm_user_visible_only;
+ // Empty if the parsing failed, the field was not present, empty or all the
+ // applications inside the array were invalid.
+ std::vector<ChromeRelatedApplication> chrome_related_applications;
+
// Maximum length for all the strings inside the Manifest when it is sent over
// IPC. The renderer process should truncate the strings before sending the
// Manifest and the browser process must do the same when receiving it.

Powered by Google App Engine
This is Rietveld 408576698