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

Unified Diff: chrome/browser/media/router/create_presentation_session_request.cc

Issue 1406013003: [Presentation API / Media Router] Clean up default pres URL logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments #20, #22 Created 5 years, 1 month 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: chrome/browser/media/router/create_presentation_session_request.cc
diff --git a/chrome/browser/media/router/create_presentation_session_request.cc b/chrome/browser/media/router/create_presentation_session_request.cc
index b3b4bc851e45d1547f98bdfce75553cb1bd10fdd..b17abeae304d45952530288f446de8ad141860c6 100644
--- a/chrome/browser/media/router/create_presentation_session_request.cc
+++ b/chrome/browser/media/router/create_presentation_session_request.cc
@@ -12,12 +12,12 @@ using content::PresentationError;
namespace media_router {
CreatePresentationSessionRequest::CreatePresentationSessionRequest(
+ const RenderFrameHostId& render_frame_host_id,
const std::string& presentation_url,
const GURL& frame_url,
const PresentationSessionSuccessCallback& success_cb,
const PresentationSessionErrorCallback& error_cb)
- : media_source_(MediaSourceForPresentationUrl(presentation_url)),
- frame_url_(frame_url),
+ : presentation_request_(render_frame_host_id, presentation_url, frame_url),
success_cb_(success_cb),
error_cb_(error_cb),
cb_invoked_(false) {
@@ -37,10 +37,9 @@ void CreatePresentationSessionRequest::InvokeSuccessCallback(
const MediaRoute::Id& route_id) {
DCHECK(!cb_invoked_);
if (!cb_invoked_) {
- // Overwrite presentation ID.
success_cb_.Run(
content::PresentationSessionInfo(
- PresentationUrlFromMediaSource(media_source_), presentation_id),
+ presentation_request_.presentation_url(), presentation_id),
route_id);
cb_invoked_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698