| 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 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3811 static_cast<RenderViewHostImpl*>(render_view_message_source_); | 3811 static_cast<RenderViewHostImpl*>(render_view_message_source_); |
| 3812 if (!rvhi->is_active()) | 3812 if (!rvhi->is_active()) |
| 3813 return; | 3813 return; |
| 3814 | 3814 |
| 3815 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3815 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3816 DidUpdateFaviconURL(candidates)); | 3816 DidUpdateFaviconURL(candidates)); |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 void WebContentsImpl::OnMediaSessionStateChanged() { | 3819 void WebContentsImpl::OnMediaSessionStateChanged() { |
| 3820 MediaSession* session = MediaSession::Get(this); | 3820 MediaSession* session = MediaSession::Get(this); |
| 3821 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3821 for (auto& observer : observers_) { |
| 3822 MediaSessionStateChanged(session->IsControllable(), | 3822 observer.MediaSessionStateChanged(session->IsControllable(), |
| 3823 session->IsSuspended(), | 3823 session->IsSuspended()); |
| 3824 session->metadata())); | 3824 } |
| 3825 } |
| 3826 |
| 3827 void WebContentsImpl::OnMediaSessionMetadataChanged() { |
| 3828 MediaSession* session = MediaSession::Get(this); |
| 3829 for (auto& observer : observers_) { |
| 3830 observer.MediaSessionMetadataChanged(session->metadata()); |
| 3831 } |
| 3825 } | 3832 } |
| 3826 | 3833 |
| 3827 void WebContentsImpl::ResumeMediaSession() { | 3834 void WebContentsImpl::ResumeMediaSession() { |
| 3828 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); | 3835 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); |
| 3829 } | 3836 } |
| 3830 | 3837 |
| 3831 void WebContentsImpl::SuspendMediaSession() { | 3838 void WebContentsImpl::SuspendMediaSession() { |
| 3832 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); | 3839 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); |
| 3833 } | 3840 } |
| 3834 | 3841 |
| (...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5248 dialog_manager_ = dialog_manager; | 5255 dialog_manager_ = dialog_manager; |
| 5249 } | 5256 } |
| 5250 | 5257 |
| 5251 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5258 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5252 auto it = binding_sets_.find(interface_name); | 5259 auto it = binding_sets_.find(interface_name); |
| 5253 if (it != binding_sets_.end()) | 5260 if (it != binding_sets_.end()) |
| 5254 binding_sets_.erase(it); | 5261 binding_sets_.erase(it); |
| 5255 } | 5262 } |
| 5256 | 5263 |
| 5257 } // namespace content | 5264 } // namespace content |
| OLD | NEW |