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

Unified Diff: webkit/glue/web_intent_data.h

Issue 11026070: Add API to construct new vector interchange MIME data type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 9dd0c4079e462af062e8aa8d16b98965551d1c28..7e4d21e005cc6648754d9666215f48653bb53b1e 100644
--- a/webkit/glue/web_intent_data.h
+++ b/webkit/glue/web_intent_data.h
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "base/string16.h"
+#include "base/values.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -29,6 +30,7 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
// WebSerializedScriptValue.
string16 data;
// Any extra key-value pair metadata. (Not serialized.)
+ // Deprecated. Will be phased out in M25.
groby-ooo-7-16 2012/10/05 17:56:35 Should we UMA usage of this?
Greg Billock 2012/10/05 22:03:26 Nah. We're going to kill it regardless.
std::map<string16, string16> extra_data;
// Set to the service page if this intent data is from an explicit intent
@@ -38,18 +40,25 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
// Any suggested service url the client attached to the intent.
std::vector<GURL> suggestions;
- // String payload data.
+ // String payload data. TODO(gbillock): should this be deprecated?
string16 unserialized_data;
// The global message port IDs of any transferred MessagePorts.
std::vector<int> message_port_ids;
// The file of a payload blob. Together with |blob_length|, suitable
- // arguments to WebBlob::createFromFile.
+ // arguments to WebBlob::createFromFile. Note: when mime_data has
+ // length==1, this blob will be set as the 'blob' member of the first
+ // object in the delivered data payload.
FilePath blob_file;
// Length of the blob.
int64 blob_length;
+ // List of values to be passed as MIME data. These will be encoded as a
+ // serialized sequence of objects when delivered. Must contain
+ // DictionaryValues.
+ ListValue mime_data;
+
// Store the file system parameters to create a new file system.
std::string root_name;
std::string filesystem_id;
@@ -60,6 +69,7 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
UNSERIALIZED = 1, // The payload is unserialized in |unserialized_data|.
BLOB = 2, // The payload is a blob.
FILESYSTEM = 3, // The payload is WebFileSystem.
+ MIME_TYPE = 4, // The payload is a MIME type.
};
// Which data payload to use when delivering the intent.
DataType data_type;
@@ -70,6 +80,8 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
WebIntentData(const WebKit::WebIntent& intent);
WebIntentData(const string16& action_in,
+ const string16& type_in);
+ WebIntentData(const string16& action_in,
const string16& type_in,
const string16& unserialized_data_in);
WebIntentData(const string16& action_in,
@@ -80,6 +92,10 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
const string16& type_in,
const std::string& root_name_in,
const std::string& filesystem_id_in);
+
+ // Special copy constructor needed for ListValue support.
+ WebIntentData(const WebIntentData& intent_data);
+
groby-ooo-7-16 2012/10/05 17:56:35 Does WebIntentData need to be copy-constructed at
Greg Billock 2012/10/05 22:03:26 Yes, good point. I'll private it out. On 2012/10/
~WebIntentData();
};

Powered by Google App Engine
This is Rietveld 408576698