| OLD | NEW |
| 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 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 static_cast<RenderViewHostImpl*>(render_view_message_source_); | 3508 static_cast<RenderViewHostImpl*>(render_view_message_source_); |
| 3509 if (!rvhi->is_active()) | 3509 if (!rvhi->is_active()) |
| 3510 return; | 3510 return; |
| 3511 | 3511 |
| 3512 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3512 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3513 DidUpdateFaviconURL(candidates)); | 3513 DidUpdateFaviconURL(candidates)); |
| 3514 } | 3514 } |
| 3515 | 3515 |
| 3516 #if defined(OS_ANDROID) | 3516 #if defined(OS_ANDROID) |
| 3517 | 3517 |
| 3518 void WebContentsImpl::OnMediaSessionStateChanged() { | 3518 void WebContentsImpl::OnMediaSessionStateChanged(MediaSession* session) { |
| 3519 MediaSession* session = MediaSession::Get(this); | |
| 3520 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3519 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3521 MediaSessionStateChanged(session->IsControllable(), | 3520 MediaSessionStateChanged(session->IsControllable(), |
| 3522 session->IsSuspended())); | 3521 session->IsSuspended())); |
| 3523 } | 3522 } |
| 3524 | 3523 |
| 3525 void WebContentsImpl::ResumeMediaSession() { | 3524 void WebContentsImpl::ResumeMediaSession() { |
| 3526 MediaSession::Get(this)->Resume(); | 3525 MediaSession::Get(this)->Resume(); |
| 3527 } | 3526 } |
| 3528 | 3527 |
| 3529 void WebContentsImpl::SuspendMediaSession() { | 3528 void WebContentsImpl::SuspendMediaSession() { |
| (...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4744 const WebContentsObserver::MediaPlayerId& id) { | 4743 const WebContentsObserver::MediaPlayerId& id) { |
| 4745 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4744 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4746 } | 4745 } |
| 4747 | 4746 |
| 4748 void WebContentsImpl::MediaStoppedPlaying( | 4747 void WebContentsImpl::MediaStoppedPlaying( |
| 4749 const WebContentsObserver::MediaPlayerId& id) { | 4748 const WebContentsObserver::MediaPlayerId& id) { |
| 4750 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4749 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4751 } | 4750 } |
| 4752 | 4751 |
| 4753 } // namespace content | 4752 } // namespace content |
| OLD | NEW |