| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 GetLocalPlayer(player_id)->SeekTo(remote_player->GetCurrentTime()); | 201 GetLocalPlayer(player_id)->SeekTo(remote_player->GetCurrentTime()); |
| 202 SwapCurrentPlayer(player_id); | 202 SwapCurrentPlayer(player_id); |
| 203 remote_player->Release(); | 203 remote_player->Release(); |
| 204 players_playing_remotely_.erase(player_id); | 204 players_playing_remotely_.erase(player_id); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void RemoteMediaPlayerManager::OnRemoteDeviceUnselected(int player_id) { | 207 void RemoteMediaPlayerManager::OnRemoteDeviceUnselected(int player_id) { |
| 208 ReplaceRemotePlayerWithLocal(player_id); | 208 ReplaceRemotePlayerWithLocal(player_id); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void RemoteMediaPlayerManager::OnRemotePlaybackStarted(int player_id) { |
| 212 Send(new MediaPlayerMsg_RemotePlaybackStarted(RoutingID(), player_id)); |
| 213 } |
| 214 |
| 211 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) { | 215 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) { |
| 212 ReplaceRemotePlayerWithLocal(player_id); | 216 ReplaceRemotePlayerWithLocal(player_id); |
| 213 } | 217 } |
| 214 | 218 |
| 215 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged( | 219 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged( |
| 216 int player_id, bool routes_available) { | 220 int player_id, bool routes_available) { |
| 217 Send( | 221 Send( |
| 218 new MediaPlayerMsg_RemoteRouteAvailabilityChanged(RoutingID(), player_id, | 222 new MediaPlayerMsg_RemoteRouteAvailabilityChanged(RoutingID(), player_id, |
| 219 routes_available)); | 223 routes_available)); |
| 220 } | 224 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id); | 287 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id); |
| 284 Send(new MediaPlayerMsg_MediaMetadataChanged( | 288 Send(new MediaPlayerMsg_MediaMetadataChanged( |
| 285 RoutingID(), player_id, duration, local_player->GetVideoWidth(), | 289 RoutingID(), player_id, duration, local_player->GetVideoWidth(), |
| 286 local_player->GetVideoHeight(), success)); | 290 local_player->GetVideoHeight(), success)); |
| 287 } else { | 291 } else { |
| 288 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, | 292 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, |
| 289 width, height, success); | 293 width, height, success); |
| 290 } | 294 } |
| 291 } | 295 } |
| 292 } // namespace remote_media | 296 } // namespace remote_media |
| OLD | NEW |