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_ |