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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 278353003: Make RendererMediaPlayerManager a RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fix. Created 6 years, 7 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: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 8fcfba9c40c3e94337dd1e6f9ef5e67855fc275c..4b9cb921c491d6fab70badb18f696248d8373a4b 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -24,7 +24,7 @@
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/geolocation/geolocation_dispatcher_host.h"
-#include "content/browser/media/android/browser_media_player_manager.h"
+#include "content/browser/media/android/media_web_contents_observer.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/input/motion_event_android.h"
#include "content/browser/renderer_host/input/web_input_event_builders_android.h"
@@ -413,9 +413,10 @@ void ContentViewCoreImpl::Hide() {
}
void ContentViewCoreImpl::PauseVideo() {
- RenderViewHost* host = web_contents_->GetRenderViewHost();
- if (host)
- host->Send(new ViewMsg_PauseVideo(host->GetRoutingID()));
+ RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
+ web_contents_->GetRenderViewHost());
+ if (rvhi)
+ rvhi->media_web_contents_observer()->PauseVideo();
}
void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) {

Powered by Google App Engine
This is Rietveld 408576698