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_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const blink::WebURL& url, | 92 const blink::WebURL& url, |
93 CORSMode cors_mode); | 93 CORSMode cors_mode); |
94 | 94 |
95 // Playback controls. | 95 // Playback controls. |
96 virtual void play(); | 96 virtual void play(); |
97 virtual void pause(); | 97 virtual void pause(); |
98 virtual void seek(double seconds); | 98 virtual void seek(double seconds); |
99 virtual bool supportsSave() const; | 99 virtual bool supportsSave() const; |
100 virtual void setRate(double rate); | 100 virtual void setRate(double rate); |
101 virtual void setVolume(double volume); | 101 virtual void setVolume(double volume); |
| 102 virtual void requestRemotePlayback(); |
| 103 virtual void requestRemotePlaybackControl(); |
102 virtual blink::WebTimeRanges buffered() const; | 104 virtual blink::WebTimeRanges buffered() const; |
103 virtual double maxTimeSeekable() const; | 105 virtual double maxTimeSeekable() const; |
104 | 106 |
105 // Poster image, as defined in the <video> element. | 107 // Poster image, as defined in the <video> element. |
106 virtual void setPoster(const blink::WebURL& poster) OVERRIDE; | 108 virtual void setPoster(const blink::WebURL& poster) OVERRIDE; |
107 | 109 |
108 // Methods for painting. | 110 // Methods for painting. |
109 // FIXME: This path "only works" on Android. It is a workaround for the | 111 // FIXME: This path "only works" on Android. It is a workaround for the |
110 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture | 112 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture |
111 // internally. It should be removed and replaced by the normal paint path. | 113 // internally. It should be removed and replaced by the normal paint path. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 void OnTimeUpdate(const base::TimeDelta& current_time); | 179 void OnTimeUpdate(const base::TimeDelta& current_time); |
178 | 180 |
179 // Functions called when media player status changes. | 181 // Functions called when media player status changes. |
180 void OnConnectedToRemoteDevice(const std::string& remote_playback_message); | 182 void OnConnectedToRemoteDevice(const std::string& remote_playback_message); |
181 void OnDisconnectedFromRemoteDevice(); | 183 void OnDisconnectedFromRemoteDevice(); |
182 void OnDidEnterFullscreen(); | 184 void OnDidEnterFullscreen(); |
183 void OnDidExitFullscreen(); | 185 void OnDidExitFullscreen(); |
184 void OnMediaPlayerPlay(); | 186 void OnMediaPlayerPlay(); |
185 void OnMediaPlayerPause(); | 187 void OnMediaPlayerPause(); |
186 void OnRequestFullscreen(); | 188 void OnRequestFullscreen(); |
| 189 void OnRemoteRouteAvailabilityChanged(bool routes_available); |
187 | 190 |
188 // Called when the player is released. | 191 // Called when the player is released. |
189 virtual void OnPlayerReleased(); | 192 virtual void OnPlayerReleased(); |
190 | 193 |
191 // This function is called by the RendererMediaPlayerManager to pause the | 194 // This function is called by the RendererMediaPlayerManager to pause the |
192 // video and release the media player and surface texture when we switch tabs. | 195 // video and release the media player and surface texture when we switch tabs. |
193 // However, the actual GlTexture is not released to keep the video screenshot. | 196 // However, the actual GlTexture is not released to keep the video screenshot. |
194 virtual void ReleaseMediaResources(); | 197 virtual void ReleaseMediaResources(); |
195 | 198 |
196 // RenderFrameObserver implementation. | 199 // RenderFrameObserver implementation. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 455 |
453 // NOTE: Weak pointers must be invalidated before all other member variables. | 456 // NOTE: Weak pointers must be invalidated before all other member variables. |
454 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 457 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
455 | 458 |
456 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 459 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
457 }; | 460 }; |
458 | 461 |
459 } // namespace content | 462 } // namespace content |
460 | 463 |
461 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 464 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |