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

Unified Diff: content/renderer/manifest/manifest_parser.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/renderer/manifest/manifest_parser.h
diff --git a/content/renderer/manifest/manifest_parser.h b/content/renderer/manifest/manifest_parser.h
index 13e330b0ddbb18ca0cc78dcc98199d027f290015..8c605de5a137dffa90952121fc052fca93adda72 100644
--- a/content/renderer/manifest/manifest_parser.h
+++ b/content/renderer/manifest/manifest_parser.h
@@ -135,6 +135,26 @@ class CONTENT_EXPORT ManifestParser {
// Returns true iff the string could be parsed as the boolean true.
bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary);
+ // Parses the platform field of a related application.
+ // Returns CHROME_RELATED_APPLICATION_PLATFORM_UNSPECIFIED if the parsing
+ // failed.
+ Manifest::ChromeRelatedApplicationPlatform
+ ParseChromeRelatedApplicationPlatform(
+ const base::DictionaryValue& application);
+
+ // Parses the id field of a related application.
+ // Returns the parsed string if any, a null string if the parsing failed.
+ base::NullableString16 ParseChromeRelatedApplicationId(
+ const base::DictionaryValue& application);
+
+ // Parses the 'chrome_related_applications' field of the manifest.
+ // Returns a vector of Manifest::RelatedApplication with the successfully
+ // parsed applications, if any. An empty vector if the field was not present
+ // or empty.
+ std::vector<Manifest::ChromeRelatedApplication>
+ ParseChromeRelatedApplications(
+ const base::DictionaryValue& dictionary);
+
const base::StringPiece& data_;
GURL manifest_url_;
GURL document_url_;

Powered by Google App Engine
This is Rietveld 408576698