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

Unified Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp

Issue 2309403002: Use the URL passed to navigator.share(). (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
index 6fb373c3c4938c80e61e10848e91c9b51dd4cdcd..1613a2b0ad36b107182e28750e372a8600804116 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
@@ -104,8 +104,11 @@ ScriptPromise NavigatorShare::share(ScriptState* scriptState, const ShareData& s
m_clients.add(client);
ScriptPromise promise = resolver->promise();
- // TODO(sammc): Use shareData.url().
- m_service->Share(shareData.hasTitle() ? shareData.title() : emptyString(), shareData.hasText() ? shareData.text() : emptyString(), convertToBaseCallback(WTF::bind(&ShareClientImpl::callback, wrapPersistent(client))));
+ m_service->Share(
+ shareData.hasTitle() ? shareData.title() : emptyString(),
+ shareData.hasText() ? shareData.text() : emptyString(),
+ shareData.hasURL() ? KURL(scriptState->getExecutionContext()->url(), shareData.url()) : KURL(),
dcheng 2016/09/08 03:17:37 Should this be using doc->completeURL(shareData.ur
Sam McNally 2016/09/08 03:32:05 Done.
+ convertToBaseCallback(WTF::bind(&ShareClientImpl::callback, wrapPersistent(client))));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698