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/android/media_session_controller.h" | 5 #include "content/browser/media/session/media_session_controller.h" |
6 | 6 |
7 #include "content/browser/media/android/media_session.h" | |
8 #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.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" |
11 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 MediaSessionController::MediaSessionController( | 15 MediaSessionController::MediaSessionController( |
16 const WebContentsObserver::MediaPlayerId& id, | 16 const WebContentsObserver::MediaPlayerId& id, |
17 MediaWebContentsObserver* media_web_contents_observer) | 17 MediaWebContentsObserver* media_web_contents_observer) |
18 : id_(id), | 18 : id_(id), |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_->IsSuspended()) |
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 |