summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 20:06:56 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 20:06:56 +0000
commit12982ea43bcb1f65d96f51457e6b427a9b7b960c (patch)
tree7f50c47c0a611622cf517f95dbd23d5f9dd0c38b /webkit
parent6da4a15cf1d7674a2d4950303f0215e8cc767e60 (diff)
downloadchromium_src-12982ea43bcb1f65d96f51457e6b427a9b7b960c.zip
chromium_src-12982ea43bcb1f65d96f51457e6b427a9b7b960c.tar.gz
chromium_src-12982ea43bcb1f65d96f51457e6b427a9b7b960c.tar.bz2
Pass web intents client suggestions along through webkit glue layer.
BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10413043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139353 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/web_intent_data.cc11
-rw-r--r--webkit/glue/web_intent_data.h3
2 files changed, 13 insertions, 1 deletions
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;