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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp

Issue 2174693004: [Presentation API] Add support to content/ for multiple URLs per PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update service, dispatcher to use Mojo URLs. Created 4 years, 4 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/presentation/PresentationRequest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
index 0d4e18917acdd6e123c8b3ffe71292316811d0d5..6b8ba25244e64fb7af9e7082869e6f8682d1e023 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -105,7 +105,10 @@ ScriptPromise PresentationRequest::start(ScriptState* scriptState)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "The PresentationRequest is no longer associated to a frame."));
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
- client->startSession(m_url.getString(), new PresentationConnectionCallbacks(resolver, this));
+ // TODO(crbug.com/627655): Accept multiple URLs per PresentationRequest.
+ WebVector<WebString> presentationUrls(static_cast<size_t>(1));
+ presentationUrls[0] = m_url.getString();
+ client->startSession(presentationUrls, new PresentationConnectionCallbacks(resolver, this));
return resolver->promise();
}
@@ -119,7 +122,10 @@ ScriptPromise PresentationRequest::reconnect(ScriptState* scriptState, const Str
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "The PresentationRequest is no longer associated to a frame."));
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
- client->joinSession(m_url.getString(), id, new PresentationConnectionCallbacks(resolver, this));
+ // TODO(crbug.com/627655): Accept multiple URLs per PresentationRequest.
+ WebVector<WebString> presentationUrls(static_cast<size_t>(1));
+ presentationUrls[0] = m_url.getString();
+ client->joinSession(presentationUrls, id, new PresentationConnectionCallbacks(resolver, this));
return resolver->promise();
}

Powered by Google App Engine
This is Rietveld 408576698