OLD | NEW |
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 CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Any actual seek started by renderer will be handled by browser in OnSeek(). | 67 // Any actual seek started by renderer will be handled by browser in OnSeek(). |
68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); | 68 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); |
69 | 69 |
70 // Stops and releases every media managed by this class. | 70 // Stops and releases every media managed by this class. |
71 void ReleaseAllMediaPlayers(); | 71 void ReleaseAllMediaPlayers(); |
72 | 72 |
73 // media::MediaPlayerManager overrides. | 73 // media::MediaPlayerManager overrides. |
74 virtual void OnTimeUpdate( | 74 virtual void OnTimeUpdate( |
75 int player_id, | 75 int player_id, |
76 base::TimeDelta current_timestamp, | 76 base::TimeDelta current_timestamp, |
77 base::TimeTicks current_time_ticks) OVERRIDE; | 77 base::TimeTicks current_time_ticks) override; |
78 virtual void OnMediaMetadataChanged( | 78 virtual void OnMediaMetadataChanged( |
79 int player_id, | 79 int player_id, |
80 base::TimeDelta duration, | 80 base::TimeDelta duration, |
81 int width, | 81 int width, |
82 int height, | 82 int height, |
83 bool success) OVERRIDE; | 83 bool success) override; |
84 virtual void OnPlaybackComplete(int player_id) OVERRIDE; | 84 virtual void OnPlaybackComplete(int player_id) override; |
85 virtual void OnMediaInterrupted(int player_id) OVERRIDE; | 85 virtual void OnMediaInterrupted(int player_id) override; |
86 virtual void OnBufferingUpdate(int player_id, int percentage) OVERRIDE; | 86 virtual void OnBufferingUpdate(int player_id, int percentage) override; |
87 virtual void OnSeekComplete( | 87 virtual void OnSeekComplete( |
88 int player_id, | 88 int player_id, |
89 const base::TimeDelta& current_time) OVERRIDE; | 89 const base::TimeDelta& current_time) override; |
90 virtual void OnError(int player_id, int error) OVERRIDE; | 90 virtual void OnError(int player_id, int error) override; |
91 virtual void OnVideoSizeChanged( | 91 virtual void OnVideoSizeChanged( |
92 int player_id, int width, int height) OVERRIDE; | 92 int player_id, int width, int height) override; |
93 virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE; | 93 virtual media::MediaResourceGetter* GetMediaResourceGetter() override; |
94 virtual media::MediaUrlInterceptor* GetMediaUrlInterceptor() OVERRIDE; | 94 virtual media::MediaUrlInterceptor* GetMediaUrlInterceptor() override; |
95 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE; | 95 virtual media::MediaPlayerAndroid* GetFullscreenPlayer() override; |
96 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE; | 96 virtual media::MediaPlayerAndroid* GetPlayer(int player_id) override; |
97 virtual void RequestFullScreen(int player_id) OVERRIDE; | 97 virtual void RequestFullScreen(int player_id) override; |
98 #if defined(VIDEO_HOLE) | 98 #if defined(VIDEO_HOLE) |
99 virtual bool ShouldUseVideoOverlayForEmbeddedEncryptedVideo() OVERRIDE; | 99 virtual bool ShouldUseVideoOverlayForEmbeddedEncryptedVideo() override; |
100 | 100 |
101 void AttachExternalVideoSurface(int player_id, jobject surface); | 101 void AttachExternalVideoSurface(int player_id, jobject surface); |
102 void DetachExternalVideoSurface(int player_id); | 102 void DetachExternalVideoSurface(int player_id); |
103 void OnFrameInfoUpdated(); | 103 void OnFrameInfoUpdated(); |
104 #endif // defined(VIDEO_HOLE) | 104 #endif // defined(VIDEO_HOLE) |
105 | 105 |
106 // Message handlers. | 106 // Message handlers. |
107 virtual void OnEnterFullscreen(int player_id); | 107 virtual void OnEnterFullscreen(int player_id); |
108 virtual void OnExitFullscreen(int player_id); | 108 virtual void OnExitFullscreen(int player_id); |
109 virtual void OnInitialize( | 109 virtual void OnInitialize( |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 // NOTE: Weak pointers must be invalidated before all other member variables. | 199 // NOTE: Weak pointers must be invalidated before all other member variables. |
200 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 200 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
201 | 201 |
202 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 202 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
203 }; | 203 }; |
204 | 204 |
205 } // namespace content | 205 } // namespace content |
206 | 206 |
207 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 207 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |