| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/media/android/remote/remote_media_player_manager.h" | 5 #include "chrome/browser/media/android/remote/remote_media_player_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/android/tab_android.h" | 7 #include "chrome/browser/android/tab_android.h" |
| 8 #include "chrome/common/chrome_content_client.h" | 8 #include "chrome/common/chrome_content_client.h" |
| 9 #include "content/common/media/media_player_messages_android.h" | 9 #include "content/common/media/media_player_messages_android.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 GetLocalPlayer(player_id)->SeekTo(remote_player->GetCurrentTime()); | 195 GetLocalPlayer(player_id)->SeekTo(remote_player->GetCurrentTime()); |
| 196 SwapCurrentPlayer(player_id); | 196 SwapCurrentPlayer(player_id); |
| 197 remote_player->Release(); | 197 remote_player->Release(); |
| 198 players_playing_remotely_.erase(player_id); | 198 players_playing_remotely_.erase(player_id); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void RemoteMediaPlayerManager::OnRemoteDeviceUnselected(int player_id) { | 201 void RemoteMediaPlayerManager::OnRemoteDeviceUnselected(int player_id) { |
| 202 ReplaceRemotePlayerWithLocal(player_id); | 202 ReplaceRemotePlayerWithLocal(player_id); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void RemoteMediaPlayerManager::OnRemotePlaybackStarted(int player_id) { |
| 206 Send(new MediaPlayerMsg_RemotePlaybackStarted(RoutingID(), player_id)); |
| 207 } |
| 208 |
| 205 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) { | 209 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) { |
| 206 ReplaceRemotePlayerWithLocal(player_id); | 210 ReplaceRemotePlayerWithLocal(player_id); |
| 207 } | 211 } |
| 208 | 212 |
| 209 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged( | 213 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged( |
| 210 int player_id, bool routes_available) { | 214 int player_id, bool routes_available) { |
| 211 Send( | 215 Send( |
| 212 new MediaPlayerMsg_RemoteRouteAvailabilityChanged(RoutingID(), player_id, | 216 new MediaPlayerMsg_RemoteRouteAvailabilityChanged(RoutingID(), player_id, |
| 213 routes_available)); | 217 routes_available)); |
| 214 } | 218 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id); | 281 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id); |
| 278 Send(new MediaPlayerMsg_MediaMetadataChanged( | 282 Send(new MediaPlayerMsg_MediaMetadataChanged( |
| 279 RoutingID(), player_id, duration, local_player->GetVideoWidth(), | 283 RoutingID(), player_id, duration, local_player->GetVideoWidth(), |
| 280 local_player->GetVideoHeight(), success)); | 284 local_player->GetVideoHeight(), success)); |
| 281 } else { | 285 } else { |
| 282 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, | 286 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, |
| 283 width, height, success); | 287 width, height, success); |
| 284 } | 288 } |
| 285 } | 289 } |
| 286 } // namespace remote_media | 290 } // namespace remote_media |
| OLD | NEW |