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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1698933004: Make MediaSession a runtime-enabled feature on Desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index feed3fe4ed60cc5bfe6dcfe401fa38162970f1cb..201d01f9ed3d4fc5c31601635b81288cc7a27db2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -54,6 +54,7 @@
#include "content/browser/media/audio_stream_monitor.h"
#include "content/browser/media/capture/web_contents_audio_muter.h"
#include "content/browser/media/media_web_contents_observer.h"
+#include "content/browser/media/session/media_session.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/plugin_content_origin_whitelist.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
@@ -126,7 +127,6 @@
#if defined(OS_ANDROID)
#include "content/browser/android/content_video_view.h"
#include "content/browser/android/date_time_chooser_android.h"
-#include "content/browser/media/android/media_session.h"
#include "content/browser/media/android/media_web_contents_observer_android.h"
#include "content/browser/web_contents/web_contents_android.h"
#endif // OS_ANDROID
@@ -3582,8 +3582,6 @@ void WebContentsImpl::OnUpdateFaviconURL(
DidUpdateFaviconURL(candidates));
}
-#if defined(OS_ANDROID)
-
void WebContentsImpl::OnMediaSessionStateChanged() {
MediaSession* session = MediaSession::Get(this);
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
@@ -3592,19 +3590,17 @@ void WebContentsImpl::OnMediaSessionStateChanged() {
}
void WebContentsImpl::ResumeMediaSession() {
- MediaSession::Get(this)->Resume();
+ MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
}
void WebContentsImpl::SuspendMediaSession() {
- MediaSession::Get(this)->Suspend();
+ MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
}
void WebContentsImpl::StopMediaSession() {
- MediaSession::Get(this)->Stop();
+ MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI);
}
-#endif // defined(OS_ANDROID)
-
void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
DidFirstVisuallyNonEmptyPaint());
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698