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

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

Issue 1466573002: Presentation API: implement renderer side of PresentationConnection.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/presentation_service_delegate_impl.cc
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc
index 926c32dbbb2870420e74566976a9f7462e12eaba..670fe4c1b58cf491815f989c9d383ea4e77fb5ab 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -725,6 +725,24 @@ void PresentationServiceDelegateImpl::CloseSession(
DVLOG(1) << "No active route for: " << presentation_id;
return;
}
+
+ // TODO(mfoltz, mlamouri): implement CloseSession().
+ // This could call router_->OnPresentationSessionDetached(route_id).
+ // PresentationFrame::Reset() should probably call CloseSession() too.
+ // Rename CloseRoute() to something else to avoid confusion?
+ NOTIMPLEMENTED();
+}
+
+void PresentationServiceDelegateImpl::TerminateSession(
+ int render_process_id,
+ int render_frame_id,
+ const std::string& presentation_id) {
+ const MediaRoute::Id& route_id = frame_manager_->GetRouteId(
+ RenderFrameHostId(render_process_id, render_frame_id), presentation_id);
+ if (route_id.empty()) {
+ DVLOG(1) << "No active route for: " << presentation_id;
+ return;
+ }
router_->CloseRoute(route_id);
}

Powered by Google App Engine
This is Rietveld 408576698