| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/media/session/media_session_controller.h" | 5 #include "content/browser/media/session/media_session_controller.h" |
| 6 | 6 |
| 7 #include "content/browser/media/media_web_contents_observer.h" | 7 #include "content/browser/media/media_web_contents_observer.h" |
| 8 #include "content/browser/media/session/media_session_impl.h" | 8 #include "content/browser/media/session/media_session_impl.h" |
| 9 #include "content/common/media/media_player_delegate_messages.h" | 9 #include "content/common/media/media_player_delegate_messages.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 id_.first->GetRoutingID(), id_.second, volume_multiplier)); | 95 id_.first->GetRoutingID(), id_.second, volume_multiplier)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 RenderFrameHost* MediaSessionController::GetRenderFrameHost() const { | 98 RenderFrameHost* MediaSessionController::GetRenderFrameHost() const { |
| 99 return id_.first; | 99 return id_.first; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void MediaSessionController::OnPlaybackPaused() { | 102 void MediaSessionController::OnPlaybackPaused() { |
| 103 // We check for suspension here since the renderer may issue its own pause | 103 // We check for suspension here since the renderer may issue its own pause |
| 104 // in response to or while a pause from the browser is in flight. | 104 // in response to or while a pause from the browser is in flight. |
| 105 if (!media_session_->IsSuspended()) | 105 if (media_session_->IsActive()) |
| 106 media_session_->OnPlayerPaused(this, player_id_); | 106 media_session_->OnPlayerPaused(this, player_id_); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace content | 109 } // namespace content |
| OLD | NEW |