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

Unified Diff: content/browser/media/android/browser_media_player_manager.h

Issue 2742333002: Remove ScopedVector from content/browser/ [1]. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/android/browser_media_player_manager.h
diff --git a/content/browser/media/android/browser_media_player_manager.h b/content/browser/media/android/browser_media_player_manager.h
index fe626c13a2f3f529c3c0aa2299eb49ffa839d40f..87cbf9c124f4038e731c04866c1597f1e76ca22d 100644
--- a/content/browser/media/android/browser_media_player_manager.h
+++ b/content/browser/media/android/browser_media_player_manager.h
@@ -7,10 +7,10 @@
#include <map>
#include <memory>
+#include <vector>
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
#include "content/browser/android/content_video_view.h"
#include "content/common/content_export.h"
@@ -114,7 +114,8 @@ class CONTENT_EXPORT BrowserMediaPlayerManager
// Adds a given player to the list. Not private to allow embedders
// to extend the manager and still utilize the base player management.
- void AddPlayer(media::MediaPlayerAndroid* player, int delegate_id);
+ void AddPlayer(std::unique_ptr<media::MediaPlayerAndroid> player,
+ int delegate_id);
// Removes the player with the specified id.
void DestroyPlayer(int player_id);
@@ -151,7 +152,7 @@ class CONTENT_EXPORT BrowserMediaPlayerManager
private:
// Constructs a MediaPlayerAndroid object.
- media::MediaPlayerAndroid* CreateMediaPlayer(
+ std::unique_ptr<media::MediaPlayerAndroid> CreateMediaPlayer(
const MediaPlayerHostMsg_Initialize_Params& media_player_params,
bool hide_url_log);
@@ -168,7 +169,7 @@ class CONTENT_EXPORT BrowserMediaPlayerManager
RenderFrameHost* const render_frame_host_;
// An array of managed players.
- ScopedVector<media::MediaPlayerAndroid> players_;
+ std::vector<std::unique_ptr<media::MediaPlayerAndroid>> players_;
typedef std::map<int, bool> ActivePlayerMap;
// Players that have requested decoding resources. Even though resource is

Powered by Google App Engine
This is Rietveld 408576698