Index: media/base/android/media_source_player.h |
diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h |
index 3c16689f7ddd43869f244fde0207e24c693ca3fd..e9ea9245fddfcd95c7c0445dc23d5520b5fef5ef 100644 |
--- a/media/base/android/media_source_player.h |
+++ b/media/base/android/media_source_player.h |
@@ -154,6 +154,14 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
// resync with audio and starts decoding. |
void OnPrefetchDone(); |
+ // Test-only method to setup hook for the completion of the next decode cycle. |
acolwell GONE FROM CHROMIUM
2013/10/31 17:54:00
nit: You should add that this callback state is cl
wolenetz
2013/11/01 20:45:28
Done.
|
+ void set_decode_callback_for_testing(const base::Closure& test_decode_cb) { |
+ decode_callback_for_testing_ = test_decode_cb; |
+ } |
+ |
+ // TODO(qinmin/wolenetz): Reorder these based on their priority from |
+ // ProcessPendingEvents(). Release() and other routines are dependent upon |
+ // priority consistency. |
enum PendingEventFlags { |
NO_EVENT_PENDING = 0, |
SEEK_EVENT_PENDING = 1 << 0, |
@@ -257,6 +265,9 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
// try to start playback again. |
bool is_waiting_for_key_; |
+ // Test-only callback for hooking the completion of the next decode cycle. |
+ base::Closure decode_callback_for_testing_; |
+ |
friend class MediaSourcePlayerTest; |
DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
}; |