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

Unified Diff: webkit/glue/web_intent_data.h

Issue 9651020: Pass content-type resources to web intents. Goes through download, then invokes the p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ability to send unserialized intent data from browser process. Created 8 years, 9 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: webkit/glue/web_intent_data.h
diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h
index 540cd159a30eae7c275757d45218c92e948f1add..c8c8de7222b368ad9b907b2f95162a64af0ae200 100644
--- a/webkit/glue/web_intent_data.h
+++ b/webkit/glue/web_intent_data.h
@@ -5,6 +5,8 @@
#ifndef WEBKIT_GLUE_WEB_INTENT_DATA_H_
#define WEBKIT_GLUE_WEB_INTENT_DATA_H_
+#include <map>
+
#include "base/string16.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -24,11 +26,59 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
// SerializedScriptObject.
string16 data;
+ // TODO(gbillock): need to add a num_message_ports_in_data field
+
+ // Any extra key-value pair metadata.
+ std::map<string16, string16> extra_data;
+
+ // String payload data.
+ string16 unserialized_data;
+
+ // The URL of a payload blob.
+ string16 blob_url;
+ // Length of the blob.
+ int blob_length;
+
+ enum {
+ SERIALIZED = 0,
+ UNSERIALIZED = 1,
+ BLOB = 2
+ };
+ int data_type;
+
WebIntentData();
WebIntentData(const WebKit::WebIntent& intent);
+ WebIntentData(const string16& action_in,
+ const string16& type_in,
+ const string16& unserialized_data_in);
+ WebIntentData(const string16& action_in,
+ const string16& type_in,
+ const string16& blob_url_in,
+ int blob_length_in);
~WebIntentData();
};
+struct WEBKIT_GLUE_EXPORT WebIntentUnserializedData {
+ // The action of the intent.
+ string16 action;
+ // The MIME type of data in this intent payload.
+ string16 type;
+
+ // Any extra key-value pair metadata.
+ std::map<string16, string16> extra_data;
+
+ // String payload data.
+ string16 unserialized_data;
+
+ // The URL of a payload blob.
+ string16 blob_url;
+ // Length of the blob.
+ int blob_length;
+
+ WebIntentUnserializedData();
+ ~WebIntentUnserializedData();
+};
+
} // namespace webkit_glue
#endif // WEBKIT_GLUE_WEB_INTENT_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698