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

Side by Side Diff: media/base/android/media_player_android.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9
10 #include <memory>
9 #include <string> 11 #include <string>
10 12
11 #include "base/callback.h" 13 #include "base/callback.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "media/base/android/media_player_listener.h" 17 #include "media/base/android/media_player_listener.h"
17 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
18 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
19 #include "ui/gl/android/scoped_java_surface.h" 20 #include "ui/gl/android/scoped_java_surface.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 namespace media { 23 namespace media {
23 24
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // and should keep updated. 182 // and should keep updated.
182 double volume_multiplier_; 183 double volume_multiplier_;
183 184
184 // Resource manager for all the media players. 185 // Resource manager for all the media players.
185 MediaPlayerManager* manager_; 186 MediaPlayerManager* manager_;
186 187
187 // Url for the frame that contains this player. 188 // Url for the frame that contains this player.
188 GURL frame_url_; 189 GURL frame_url_;
189 190
190 // Listener object that listens to all the media player events. 191 // Listener object that listens to all the media player events.
191 scoped_ptr<MediaPlayerListener> listener_; 192 std::unique_ptr<MediaPlayerListener> listener_;
192 193
193 // Media session ID assigned to this player. 194 // Media session ID assigned to this player.
194 int media_session_id_; 195 int media_session_id_;
195 196
196 // Weak pointer passed to |listener_| for callbacks. 197 // Weak pointer passed to |listener_| for callbacks.
197 // NOTE: Weak pointers must be invalidated before all other member variables. 198 // NOTE: Weak pointers must be invalidated before all other member variables.
198 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_; 199 base::WeakPtrFactory<MediaPlayerAndroid> weak_factory_;
199 200
200 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); 201 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid);
201 }; 202 };
202 203
203 } // namespace media 204 } // namespace media
204 205
205 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ 206 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « media/base/android/media_drm_bridge_unittest.cc ('k') | media/base/android/media_player_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698