diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-20 13:01:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-20 13:01:08 +0200 |
commit | 49233e234e5c787396cadb2cea33b31ae0cd65c1 (patch) | |
tree | 5410cb9a8fd53168bb60d62c54b654d86f03c38d /Source/WebKit/chromium/src/WebIntent.cpp | |
parent | b211c645d8ab690f713515dfdc84d80b11c27d2c (diff) | |
download | qtwebkit-49233e234e5c787396cadb2cea33b31ae0cd65c1.tar.gz |
Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813)
New snapshot with Windows build fixes
Diffstat (limited to 'Source/WebKit/chromium/src/WebIntent.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebIntent.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/WebKit/chromium/src/WebIntent.cpp b/Source/WebKit/chromium/src/WebIntent.cpp index 44ce2d0ac..55775ecfc 100644 --- a/Source/WebKit/chromium/src/WebIntent.cpp +++ b/Source/WebKit/chromium/src/WebIntent.cpp @@ -35,20 +35,27 @@ #include "MessagePort.h" #include "PlatformMessagePortChannel.h" #include "SerializedScriptValue.h" +#include "platform/WebSerializedScriptValue.h" #include <wtf/HashMap.h> namespace WebKit { -WebIntent::WebIntent(const WebString& action, const WebString& type, const WebString& data) +WebIntent WebIntent::create(const WebString& action, const WebString& type, const WebString& data, + const WebVector<WebString>& extrasNames, const WebVector<WebString>& extrasValues) { #if ENABLE(WEB_INTENTS) WebCore::ExceptionCode ec = 0; - WebCore::MessagePortArray ports; - RefPtr<WebCore::Intent> intent = WebCore::Intent::create(action, type, WebCore::SerializedScriptValue::createFromWire(data), ports, ec); + WebCore::MessagePortArray dummyPorts; + RefPtr<WebCore::Intent> intent = WebCore::Intent::create(action, type, WebCore::SerializedScriptValue::createFromWire(data), dummyPorts, ec); if (ec) - return; + return WebIntent(); - m_private = intent.release(); + HashMap<String, String> extras; + for (size_t i = 0; i < extrasNames.size() && i < extrasValues.size(); ++i) + extras.add(extrasNames[i], extrasValues[i]); + intent->setExtras(extras); + + return WebIntent(intent.release()); #endif } |