| 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 #ifndef CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ | 6 #define CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 int GetTabId(); | 97 int GetTabId(); |
| 98 | 98 |
| 99 // Get the player that is not currently selected | 99 // Get the player that is not currently selected |
| 100 ScopedVector<media::MediaPlayerAndroid>::iterator GetAlternativePlayer( | 100 ScopedVector<media::MediaPlayerAndroid>::iterator GetAlternativePlayer( |
| 101 int player_id); | 101 int player_id); |
| 102 | 102 |
| 103 // Get the remote player for a given player id, whether or not it is currently | 103 // Get the remote player for a given player id, whether or not it is currently |
| 104 // playing remotely. | 104 // playing remotely. |
| 105 RemoteMediaPlayerBridge* GetRemotePlayer(int player_id); | 105 RemoteMediaPlayerBridge* GetRemotePlayer(int player_id); |
| 106 | 106 |
| 107 void SwapCurrentPlayer(int player_id); | 107 bool SwapCurrentPlayer(int player_id); |
| 108 | 108 |
| 109 void FetchPosterBitmap(int player_id); | 109 void FetchPosterBitmap(int player_id); |
| 110 | 110 |
| 111 // Contains the alternative players that are not currently in use, i.e. the | 111 // Contains the alternative players that are not currently in use, i.e. the |
| 112 // remote players for videos that are playing locally, and the local players | 112 // remote players for videos that are playing locally, and the local players |
| 113 // for videos that are playing remotely. | 113 // for videos that are playing remotely. |
| 114 ScopedVector<media::MediaPlayerAndroid> alternative_players_; | 114 ScopedVector<media::MediaPlayerAndroid> alternative_players_; |
| 115 | 115 |
| 116 std::set<int> players_playing_remotely_; | 116 std::set<int> players_playing_remotely_; |
| 117 std::unordered_map<int, GURL> poster_urls_; | 117 std::unordered_map<int, GURL> poster_urls_; |
| 118 | 118 |
| 119 base::WeakPtrFactory<RemoteMediaPlayerManager> weak_ptr_factory_; | 119 base::WeakPtrFactory<RemoteMediaPlayerManager> weak_ptr_factory_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(RemoteMediaPlayerManager); | 121 DISALLOW_COPY_AND_ASSIGN(RemoteMediaPlayerManager); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace remote_media | 124 } // namespace remote_media |
| 125 | 125 |
| 126 #endif // CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ | 126 #endif // CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |