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

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: remove dependencies from other CLs Created 4 years, 10 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 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
3533 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3533 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3534 DidUpdateFaviconURL(candidates)); 3534 DidUpdateFaviconURL(candidates));
3535 } 3535 }
3536 3536
3537 #if defined(OS_ANDROID) 3537 #if defined(OS_ANDROID)
3538 3538
3539 void WebContentsImpl::OnMediaSessionStateChanged() { 3539 void WebContentsImpl::OnMediaSessionStateChanged() {
3540 MediaSession* session = MediaSession::Get(this); 3540 MediaSession* session = MediaSession::Get(this);
3541 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3541 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3542 MediaSessionStateChanged(session->IsControllable(), 3542 MediaSessionStateChanged(session->IsControllable(),
3543 session->IsSuspended())); 3543 session->IsSuspended(),
3544 session->metadata()));
3544 } 3545 }
3545 3546
3546 void WebContentsImpl::ResumeMediaSession() { 3547 void WebContentsImpl::ResumeMediaSession() {
3547 MediaSession::Get(this)->Resume(); 3548 MediaSession::Get(this)->Resume();
3548 } 3549 }
3549 3550
3550 void WebContentsImpl::SuspendMediaSession() { 3551 void WebContentsImpl::SuspendMediaSession() {
3551 MediaSession::Get(this)->Suspend(); 3552 MediaSession::Get(this)->Suspend();
3552 } 3553 }
3553 3554
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
4786 const WebContentsObserver::MediaPlayerId& id) { 4787 const WebContentsObserver::MediaPlayerId& id) {
4787 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4788 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4788 } 4789 }
4789 4790
4790 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4791 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4791 JavaScriptDialogManager* dialog_manager) { 4792 JavaScriptDialogManager* dialog_manager) {
4792 dialog_manager_ = dialog_manager; 4793 dialog_manager_ = dialog_manager;
4793 } 4794 }
4794 4795
4795 } // namespace content 4796 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698