Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/browser/media/android/remote/remote_media_player_manager.h

Issue 1895873005: [Android,VideoFling] Never add null players to alternative ones (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/media/android/remote/remote_media_player_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/android/remote/remote_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698