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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2931513003: Recreate MediaPermissionDispatcher's service connection on navigation (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « content/renderer/media/media_permission_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index d1e9d5024442a2f25b6cf083e51073894148454e..7e2ea09e2c4e3d01e003b4bbe493b4e010704350 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3920,6 +3920,13 @@ void RenderFrameImpl::DidCommitProvisionalLoad(
is_new_navigation, navigation_state->WasWithinSameDocument());
}
+ // Notify the MediaPermissionDispatcher that its connection will be closed
+ // due to a navigation to a different document.
+ if (media_permission_dispatcher_ &&
+ !navigation_state->WasWithinSameDocument()) {
+ media_permission_dispatcher_->OnNavigation();
+ }
+
if (!frame_->Parent()) { // Only for top frames.
RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
if (render_thread_impl) { // Can be NULL in tests.
« no previous file with comments | « content/renderer/media/media_permission_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698