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

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

Issue 10961015: Android: MediaPlayerBridge JNI cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « media/base/android/media_jni_registrar.cc ('k') | media/base/android/media_player_bridge.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Callbacks when seek completed. Args: player ID, current time. 55 // Callbacks when seek completed. Args: player ID, current time.
56 typedef base::Callback<void(int, base::TimeDelta)> SeekCompleteCB; 56 typedef base::Callback<void(int, base::TimeDelta)> SeekCompleteCB;
57 57
58 // Callbacks when playback completed. Args: player ID. 58 // Callbacks when playback completed. Args: player ID.
59 typedef base::Callback<void(int)> PlaybackCompleteCB; 59 typedef base::Callback<void(int)> PlaybackCompleteCB;
60 60
61 // Callback when time update messages need to be sent. Args: player ID, 61 // Callback when time update messages need to be sent. Args: player ID,
62 // current time. 62 // current time.
63 typedef base::Callback<void(int, base::TimeDelta)> TimeUpdateCB; 63 typedef base::Callback<void(int, base::TimeDelta)> TimeUpdateCB;
64 64
65 static bool RegisterMediaPlayerBridge(JNIEnv* env);
66
65 // Construct a MediaPlayerBridge object with all the needed media player 67 // Construct a MediaPlayerBridge object with all the needed media player
66 // callbacks. This object needs to call |manager|'s RequestMediaResources() 68 // callbacks. This object needs to call |manager|'s RequestMediaResources()
67 // before decoding the media stream. This allows |manager| to track 69 // before decoding the media stream. This allows |manager| to track
68 // unused resources and free them when needed. On the other hand, it needs 70 // unused resources and free them when needed. On the other hand, it needs
69 // to call ReleaseMediaResources() when it is done with decoding. 71 // to call ReleaseMediaResources() when it is done with decoding.
70 MediaPlayerBridge(int player_id, 72 MediaPlayerBridge(int player_id,
71 const std::string& url, 73 const std::string& url,
72 const std::string& first_party_for_cookies, 74 const std::string& first_party_for_cookies,
73 CookieGetter* cookies_getter, 75 CookieGetter* cookies_getter,
74 bool hide_url_log, 76 bool hide_url_log,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 218
217 // Listener object that listens to all the media player events. 219 // Listener object that listens to all the media player events.
218 MediaPlayerListener listener_; 220 MediaPlayerListener listener_;
219 221
220 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); 222 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge);
221 }; 223 };
222 224
223 } // namespace media 225 } // namespace media
224 226
225 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ 227 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/media_jni_registrar.cc ('k') | media/base/android/media_player_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698