| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const blink::WebURL& url, | 101 const blink::WebURL& url, |
| 102 CORSMode cors_mode); | 102 CORSMode cors_mode); |
| 103 | 103 |
| 104 // Playback controls. | 104 // Playback controls. |
| 105 virtual void play(); | 105 virtual void play(); |
| 106 virtual void pause(); | 106 virtual void pause(); |
| 107 virtual void seek(double seconds); | 107 virtual void seek(double seconds); |
| 108 virtual bool supportsSave() const; | 108 virtual bool supportsSave() const; |
| 109 virtual void setRate(double rate); | 109 virtual void setRate(double rate); |
| 110 virtual void setVolume(double volume); | 110 virtual void setVolume(double volume); |
| 111 virtual void requestRemotePlayback(); |
| 112 virtual void requestRemotePlaybackControl(); |
| 111 virtual blink::WebTimeRanges buffered() const; | 113 virtual blink::WebTimeRanges buffered() const; |
| 112 virtual double maxTimeSeekable() const; | 114 virtual double maxTimeSeekable() const; |
| 113 | 115 |
| 114 // Poster image, as defined in the <video> element. | 116 // Poster image, as defined in the <video> element. |
| 115 virtual void setPoster(const blink::WebURL& poster) OVERRIDE; | 117 virtual void setPoster(const blink::WebURL& poster) OVERRIDE; |
| 116 | 118 |
| 117 // Methods for painting. | 119 // Methods for painting. |
| 118 // FIXME: This path "only works" on Android. It is a workaround for the | 120 // FIXME: This path "only works" on Android. It is a workaround for the |
| 119 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture | 121 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture |
| 120 // internally. It should be removed and replaced by the normal paint path. | 122 // internally. It should be removed and replaced by the normal paint path. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 base::TimeTicks current_time_ticks); | 194 base::TimeTicks current_time_ticks); |
| 193 | 195 |
| 194 // Functions called when media player status changes. | 196 // Functions called when media player status changes. |
| 195 void OnConnectedToRemoteDevice(const std::string& remote_playback_message); | 197 void OnConnectedToRemoteDevice(const std::string& remote_playback_message); |
| 196 void OnDisconnectedFromRemoteDevice(); | 198 void OnDisconnectedFromRemoteDevice(); |
| 197 void OnDidEnterFullscreen(); | 199 void OnDidEnterFullscreen(); |
| 198 void OnDidExitFullscreen(); | 200 void OnDidExitFullscreen(); |
| 199 void OnMediaPlayerPlay(); | 201 void OnMediaPlayerPlay(); |
| 200 void OnMediaPlayerPause(); | 202 void OnMediaPlayerPause(); |
| 201 void OnRequestFullscreen(); | 203 void OnRequestFullscreen(); |
| 204 void OnRemoteRouteAvailabilityChanged(bool routes_available); |
| 202 | 205 |
| 203 // StreamTextureFactoryContextObserver implementation. | 206 // StreamTextureFactoryContextObserver implementation. |
| 204 virtual void ResetStreamTextureProxy() OVERRIDE; | 207 virtual void ResetStreamTextureProxy() OVERRIDE; |
| 205 | 208 |
| 206 // Called when the player is released. | 209 // Called when the player is released. |
| 207 virtual void OnPlayerReleased(); | 210 virtual void OnPlayerReleased(); |
| 208 | 211 |
| 209 // This function is called by the RendererMediaPlayerManager to pause the | 212 // This function is called by the RendererMediaPlayerManager to pause the |
| 210 // video and release the media player and surface texture when we switch tabs. | 213 // video and release the media player and surface texture when we switch tabs. |
| 211 // However, the actual GlTexture is not released to keep the video screenshot. | 214 // However, the actual GlTexture is not released to keep the video screenshot. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 513 |
| 511 // NOTE: Weak pointers must be invalidated before all other member variables. | 514 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 512 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 515 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 513 | 516 |
| 514 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 517 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 515 }; | 518 }; |
| 516 | 519 |
| 517 } // namespace content | 520 } // namespace content |
| 518 | 521 |
| 519 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 522 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |