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

Side by Side Diff: content/browser/media/session/media_session_impl.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/session/media_session_impl.h" 5 #include "content/browser/media/session/media_session_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "content/browser/media/session/audio_focus_delegate.h" 8 #include "content/browser/media/session/audio_focus_delegate.h"
9 #include "content/browser/media/session/media_session_controller.h" 9 #include "content/browser/media/session/media_session_controller.h"
10 #include "content/browser/media/session/media_session_player_observer.h" 10 #include "content/browser/media/session/media_session_player_observer.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 AbandonSystemAudioFocusIfNeeded(); 111 AbandonSystemAudioFocusIfNeeded();
112 } 112 }
113 113
114 void MediaSessionImpl::RenderFrameDeleted(RenderFrameHost* rfh) { 114 void MediaSessionImpl::RenderFrameDeleted(RenderFrameHost* rfh) {
115 if (services_.count(rfh)) 115 if (services_.count(rfh))
116 OnServiceDestroyed(services_[rfh]); 116 OnServiceDestroyed(services_[rfh]);
117 } 117 }
118 118
119 void MediaSessionImpl::DidFinishNavigation( 119 void MediaSessionImpl::DidFinishNavigation(
120 NavigationHandle* navigation_handle) { 120 NavigationHandle* navigation_handle) {
121 if (!navigation_handle->HasCommitted() || navigation_handle->IsSamePage()) 121 if (!navigation_handle->HasCommitted() ||
122 navigation_handle->IsSameDocument()) {
122 return; 123 return;
124 }
123 125
124 RenderFrameHost* rfh = navigation_handle->GetRenderFrameHost(); 126 RenderFrameHost* rfh = navigation_handle->GetRenderFrameHost();
125 if (services_.count(rfh)) 127 if (services_.count(rfh))
126 services_[rfh]->DidFinishNavigation(); 128 services_[rfh]->DidFinishNavigation();
127 } 129 }
128 130
129 void MediaSessionImpl::AddObserver(MediaSessionObserver* observer) { 131 void MediaSessionImpl::AddObserver(MediaSessionObserver* observer) {
130 observers_.AddObserver(observer); 132 observers_.AddObserver(observer);
131 } 133 }
132 134
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 if (!IsServiceActiveForRenderFrameHost(frame)) 722 if (!IsServiceActiveForRenderFrameHost(frame))
721 continue; 723 continue;
722 best_frame = frame; 724 best_frame = frame;
723 min_depth = depth; 725 min_depth = depth;
724 } 726 }
725 727
726 return best_frame ? services_[best_frame] : nullptr; 728 return best_frame ? services_[best_frame] : nullptr;
727 } 729 }
728 730
729 } // namespace content 731 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/permissions/permission_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698