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

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: Remove includes 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
« no previous file with comments | « content/renderer/web_intents_host.cc ('k') | webkit/glue/web_intent_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/web_intent_data.h
diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h
index 78972de59c6496dc7c311ed2567cefdfa88f527b..686f604f22096a6dde266f29ccb78b69dfd5bd08 100644
--- a/webkit/glue/web_intent_data.h
+++ b/webkit/glue/web_intent_data.h
@@ -5,6 +5,9 @@
#ifndef WEBKIT_GLUE_WEB_INTENT_DATA_H_
#define WEBKIT_GLUE_WEB_INTENT_DATA_H_
+#include <map>
+
+#include "base/file_path.h"
#include "base/string16.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -20,17 +23,26 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
string16 action;
// The MIME type of data in this intent payload.
string16 type;
- // The representation of the payload data. Wire format is from
- // SerializedScriptObject.
+ // The serialized representation of the payload data. Wire format is from
+ // WebSerializedScriptValue.
string16 data;
+ // Any extra key-value pair metadata. (Not serialized.)
+ std::map<string16, string16> extra_data;
// String payload data.
string16 unserialized_data;
+ // The file of a payload blob. Together with |blob_length|, suitable
+ // arguments to WebBlob::createFromFile.
+ FilePath blob_file;
+ // Length of the blob.
+ int64 blob_length;
+
// These enum values indicate which payload data type should be used.
enum DataType {
- SERIALIZED = 0, // The payload is serialized in |data|.
- UNSERIALIZED = 1 // The payload is unseriazed in |unserialized_data|.
+ SERIALIZED = 0, // The payload is serialized in |data|.
+ UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|.
+ BLOB = 2 // The payload is a blob
};
// Which data payload to use when delivering the intent.
DataType data_type;
@@ -40,6 +52,10 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
WebIntentData(const string16& action_in,
const string16& type_in,
const string16& unserialized_data_in);
+ WebIntentData(const string16& action_in,
+ const string16& type_in,
+ const FilePath& blob_file_in,
+ int64 blob_length_in);
~WebIntentData();
};
« no previous file with comments | « content/renderer/web_intents_host.cc ('k') | webkit/glue/web_intent_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698