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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1458703003: Media Session API: use MediaMetadata in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_browser_side
Patch Set: nits 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
3579 return; 3579 return;
3580 3580
3581 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3581 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3582 DidUpdateFaviconURL(candidates)); 3582 DidUpdateFaviconURL(candidates));
3583 } 3583 }
3584 3584
3585 void WebContentsImpl::OnMediaSessionStateChanged() { 3585 void WebContentsImpl::OnMediaSessionStateChanged() {
3586 MediaSession* session = MediaSession::Get(this); 3586 MediaSession* session = MediaSession::Get(this);
3587 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3587 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3588 MediaSessionStateChanged(session->IsControllable(), 3588 MediaSessionStateChanged(session->IsControllable(),
3589 session->IsSuspended())); 3589 session->IsSuspended(),
3590 session->metadata()));
3590 } 3591 }
3591 3592
3592 void WebContentsImpl::ResumeMediaSession() { 3593 void WebContentsImpl::ResumeMediaSession() {
3593 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); 3594 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
3594 } 3595 }
3595 3596
3596 void WebContentsImpl::SuspendMediaSession() { 3597 void WebContentsImpl::SuspendMediaSession() {
3597 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); 3598 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
3598 } 3599 }
3599 3600
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
4839 else 4840 else
4840 WasHidden(); 4841 WasHidden();
4841 } 4842 }
4842 4843
4843 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4844 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4844 JavaScriptDialogManager* dialog_manager) { 4845 JavaScriptDialogManager* dialog_manager) {
4845 dialog_manager_ = dialog_manager; 4846 dialog_manager_ = dialog_manager;
4846 } 4847 }
4847 4848
4848 } // namespace content 4849 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/session/media_session_browsertest.cc ('k') | content/common/android/common_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698