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

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

Issue 2637003002: Add share_target field to Manifest. (Closed)
Patch Set: Changed share_target type to base::Optional, and fixed tests, according to feedback. Created 3 years, 11 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 d558d66978673f9ce20c4b0284a57818adda63ff..80e3f628550b97b0e3d6659286fdc156ce2dca78 100644
--- a/content/public/common/manifest.h
+++ b/content/public/common/manifest.h
@@ -10,6 +10,7 @@
#include <vector>
+#include "base/optional.h"
#include "base/strings/nullable_string16.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
@@ -58,6 +59,16 @@ struct CONTENT_EXPORT Manifest {
std::vector<IconPurpose> purpose;
};
+ // Structure representing how a Web Share target handles an incoming share.
+ struct CONTENT_EXPORT ShareTarget {
+ ShareTarget();
+ ~ShareTarget();
+
+ // The URL template that contains placeholders to be replaced with shared
+ // data. Null if the parsing failed.
+ base::NullableString16 url_template;
+ };
+
// Structure representing a related application.
struct CONTENT_EXPORT RelatedApplication {
RelatedApplication();
@@ -107,6 +118,13 @@ struct CONTENT_EXPORT Manifest {
// icons inside the JSON array were invalid.
std::vector<Icon> icons;
+ // Null if parsing failed or the field was not present.
+ // TODO(constantina): This field is non-standard and part of a Chrome
+ // experiment. See:
+ // https://github.com/WICG/web-share-target/blob/master/docs/interface.md
+ // As such, this field should not be exposed to web contents.
+ base::Optional<ShareTarget> share_target;
+
// 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.
« 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