diff options
-rw-r--r-- | content/common/intents_messages.h | 1 | ||||
-rw-r--r-- | webkit/glue/web_intent_data.cc | 11 | ||||
-rw-r--r-- | webkit/glue/web_intent_data.h | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/content/common/intents_messages.h b/content/common/intents_messages.h index 4dc568a..fd2866d 100644 --- a/content/common/intents_messages.h +++ b/content/common/intents_messages.h @@ -24,6 +24,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebIntentData) IPC_STRUCT_TRAITS_MEMBER(data) IPC_STRUCT_TRAITS_MEMBER(extra_data) IPC_STRUCT_TRAITS_MEMBER(service) + IPC_STRUCT_TRAITS_MEMBER(suggestions) IPC_STRUCT_TRAITS_MEMBER(unserialized_data) IPC_STRUCT_TRAITS_MEMBER(message_port_ids) IPC_STRUCT_TRAITS_MEMBER(blob_file) diff --git a/webkit/glue/web_intent_data.cc b/webkit/glue/web_intent_data.cc index 48c4e90..8b51a0c 100644 --- a/webkit/glue/web_intent_data.cc +++ b/webkit/glue/web_intent_data.cc @@ -7,8 +7,13 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" +using WebKit::WebString; +using WebKit::WebURL; +using WebKit::WebVector; + namespace webkit_glue { WebIntentData::WebIntentData() @@ -26,10 +31,14 @@ WebIntentData::WebIntentData(const WebKit::WebIntent& intent) service(intent.service()), blob_length(0), data_type(SERIALIZED) { - WebKit::WebVector<WebKit::WebString> names = intent.extrasNames(); + const WebVector<WebString>& names = intent.extrasNames(); for (size_t i = 0; i < names.size(); ++i) { extra_data[names[i]] = intent.extrasValue(names[i]); } + + const WebVector<WebURL>& clientSuggestions = intent.suggestions(); + for (size_t i = 0; i < clientSuggestions.size(); ++i) + suggestions.push_back(clientSuggestions[i]); } WebIntentData::WebIntentData(const string16& action_in, diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h index 52597cd..9b2e4b4 100644 --- a/webkit/glue/web_intent_data.h +++ b/webkit/glue/web_intent_data.h @@ -35,6 +35,9 @@ struct WEBKIT_GLUE_EXPORT WebIntentData { // invocation. |service.is_valid()| will be false otherwise. GURL service; + // Any suggested service url the client attached to the intent. + std::vector<GURL> suggestions; + // String payload data. string16 unserialized_data; |