Index: content/browser/presentation/presentation_service_impl.cc |
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc |
index c9b30d472f9ce084f396aef9d25c2ece26ebb84e..5d26643f914262a6d801960ef03f39d526cea225 100644 |
--- a/content/browser/presentation/presentation_service_impl.cc |
+++ b/content/browser/presentation/presentation_service_impl.cc |
@@ -7,9 +7,7 @@ |
#include <stddef.h> |
#include <stdint.h> |
#include <algorithm> |
-#include <string> |
#include <utility> |
-#include <vector> |
#include "base/logging.h" |
#include "base/stl_util.h" |
@@ -220,8 +218,9 @@ void PresentationServiceImpl::StopListeningForScreenAvailability( |
screen_availability_listeners_.erase(listener_it); |
} |
-void PresentationServiceImpl::StartSession(const std::string& presentation_url, |
- const NewSessionCallback& callback) { |
+void PresentationServiceImpl::StartSession( |
+ const std::vector<std::string>& presentation_urls, |
+ const NewSessionCallback& callback) { |
DVLOG(2) << "StartSession"; |
if (!delegate_) { |
callback.Run( |
@@ -241,7 +240,7 @@ void PresentationServiceImpl::StartSession(const std::string& presentation_url, |
start_session_request_id_ = GetNextRequestSessionId(); |
pending_start_session_cb_.reset(new NewSessionCallbackWrapper(callback)); |
delegate_->StartSession( |
- render_process_id_, render_frame_id_, presentation_url, |
+ render_process_id_, render_frame_id_, presentation_urls, |
base::Bind(&PresentationServiceImpl::OnStartSessionSucceeded, |
weak_factory_.GetWeakPtr(), start_session_request_id_), |
base::Bind(&PresentationServiceImpl::OnStartSessionError, |
@@ -249,7 +248,7 @@ void PresentationServiceImpl::StartSession(const std::string& presentation_url, |
} |
void PresentationServiceImpl::JoinSession( |
- const std::string& presentation_url, |
+ const std::vector<std::string>& presentation_urls, |
const base::Optional<std::string>& presentation_id, |
const NewSessionCallback& callback) { |
DVLOG(2) << "JoinSession"; |
@@ -267,7 +266,7 @@ void PresentationServiceImpl::JoinSession( |
return; |
} |
delegate_->JoinSession( |
- render_process_id_, render_frame_id_, presentation_url, |
+ render_process_id_, render_frame_id_, presentation_urls, |
presentation_id.value_or(std::string()), |
base::Bind(&PresentationServiceImpl::OnJoinSessionSucceeded, |
weak_factory_.GetWeakPtr(), request_session_id), |
@@ -357,18 +356,18 @@ bool PresentationServiceImpl::RunAndEraseJoinSessionMojoCallback( |
return true; |
} |
-void PresentationServiceImpl::SetDefaultPresentationURL( |
- const std::string& url) { |
- DVLOG(2) << "SetDefaultPresentationURL"; |
+void PresentationServiceImpl::SetDefaultPresentationUrls( |
+ const std::vector<std::string>& presentation_urls) { |
+ DVLOG(2) << "SetDefaultPresentationUrls"; |
if (!delegate_) |
return; |
- if (default_presentation_url_ == url) |
+ if (default_presentation_urls_ == presentation_urls) |
return; |
- default_presentation_url_ = url; |
- delegate_->SetDefaultPresentationUrl( |
- render_process_id_, render_frame_id_, url, |
+ default_presentation_urls_ = presentation_urls; |
+ delegate_->SetDefaultPresentationUrls( |
+ render_process_id_, render_frame_id_, presentation_urls, |
base::Bind(&PresentationServiceImpl::OnDefaultPresentationStarted, |
weak_factory_.GetWeakPtr())); |
} |
@@ -524,7 +523,7 @@ void PresentationServiceImpl::Reset() { |
if (delegate_) |
delegate_->Reset(render_process_id_, render_frame_id_); |
- default_presentation_url_.clear(); |
+ default_presentation_urls_.clear(); |
screen_availability_listeners_.clear(); |