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

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

Issue 1294133002: [Presentation API, MediaRouter] Routing from media sink selection to route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-router-discovery-2
Patch Set: Added comments and DCHECKs for null presentation request Created 5 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: 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 461c3610db7b19f100b811da9aa4402652648a4f..ddfbc6b79d7229d00a91b5f945c7e7fcdcf27943 100644
--- a/chrome/browser/media/router/create_presentation_session_request.cc
+++ b/chrome/browser/media/router/create_presentation_session_request.cc
@@ -55,4 +55,20 @@ void CreatePresentationSessionRequest::MaybeInvokeErrorCallback(
}
}
+// static
+void CreatePresentationSessionRequest::HandleRouteResponse(
+ scoped_ptr<CreatePresentationSessionRequest> presentation_request,
+ const MediaRoute* route,
+ const std::string& presentation_id,
+ const std::string& error) {
+ DCHECK(presentation_request);
Wez 2015/08/18 21:50:09 nit: No need to DCHECK here, since both paths de-r
whywhat 2015/08/19 13:04:29 Done.
+ if (!route) {
+ presentation_request->MaybeInvokeErrorCallback(
+ content::PresentationError(content::PRESENTATION_ERROR_UNKNOWN, error));
+ } else {
+ presentation_request->MaybeInvokeSuccessCallback(
+ presentation_id, route->media_route_id());
+ }
+}
+
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698