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

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: Updated unittests. Created 4 years, 5 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 9daf2ae742fe7167e7482fe20232817438dd31b5..d599ae833f797e9428f522f6694a1a8f6c152c09 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -112,7 +112,10 @@ ScriptPromise PresentationRequest::start(ScriptState* scriptState)
resolver->reject(DOMException::create(InvalidStateError, "The PresentationRequest is no longer associated to a frame."));
return promise;
}
- 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 promise;
}
@@ -131,7 +134,10 @@ ScriptPromise PresentationRequest::reconnect(ScriptState* scriptState, const Str
resolver->reject(DOMException::create(InvalidStateError, "The PresentationRequest is no longer associated to a frame."));
return promise;
}
- 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 promise;
}

Powered by Google App Engine
This is Rietveld 408576698