| OLD | NEW |
| 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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 virtual void UpdateNetworkState(WebKit::WebMediaPlayer::NetworkState state); | 139 virtual void UpdateNetworkState(WebKit::WebMediaPlayer::NetworkState state); |
| 140 virtual void UpdateReadyState(WebKit::WebMediaPlayer::ReadyState state); | 140 virtual void UpdateReadyState(WebKit::WebMediaPlayer::ReadyState state); |
| 141 | 141 |
| 142 // Helper method to reestablish the surface texture peer for android | 142 // Helper method to reestablish the surface texture peer for android |
| 143 // media player. | 143 // media player. |
| 144 virtual void EstablishSurfaceTexturePeer(); | 144 virtual void EstablishSurfaceTexturePeer(); |
| 145 | 145 |
| 146 // Requesting whether the surface texture peer needs to be reestablished. | 146 // Requesting whether the surface texture peer needs to be reestablished. |
| 147 virtual void SetNeedsEstablishPeer(bool needs_establish_peer); | 147 virtual void SetNeedsEstablishPeer(bool needs_establish_peer); |
| 148 | 148 |
| 149 // Method called by the implementation classes to set whether the player is |
| 150 // displayed to an external surface. |
| 151 void SetIsInVideoView(bool is_in_video_view); |
| 152 |
| 149 // Method to be implemented by child classes. | 153 // Method to be implemented by child classes. |
| 150 // Initialize the media player bridge object. | 154 // Initialize the media player bridge object. |
| 151 virtual void InitializeMediaPlayer(GURL url) = 0; | 155 virtual void InitializeMediaPlayer(GURL url) = 0; |
| 152 | 156 |
| 153 // Inform the media player to start playing. | 157 // Inform the media player to start playing. |
| 154 virtual void PlayInternal() = 0; | 158 virtual void PlayInternal() = 0; |
| 155 | 159 |
| 156 // Inform the media player to pause. | 160 // Inform the media player to pause. |
| 157 virtual void PauseInternal() = 0; | 161 virtual void PauseInternal() = 0; |
| 158 | 162 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 228 |
| 225 // Whether the mediaplayer is playing. | 229 // Whether the mediaplayer is playing. |
| 226 bool is_playing_; | 230 bool is_playing_; |
| 227 | 231 |
| 228 // Whether media player needs to re-establish the surface texture peer. | 232 // Whether media player needs to re-establish the surface texture peer. |
| 229 bool needs_establish_peer_; | 233 bool needs_establish_peer_; |
| 230 | 234 |
| 231 // Whether the video size info is available. | 235 // Whether the video size info is available. |
| 232 bool has_size_info_; | 236 bool has_size_info_; |
| 233 | 237 |
| 238 // Whether the player is rendered to an external surface. |
| 239 bool is_in_video_view_; |
| 240 |
| 234 // Object for allocating stream textures. | 241 // Object for allocating stream textures. |
| 235 scoped_ptr<StreamTextureFactory> stream_texture_factory_; | 242 scoped_ptr<StreamTextureFactory> stream_texture_factory_; |
| 236 | 243 |
| 237 // Object for calling back the compositor thread to repaint the video when a | 244 // Object for calling back the compositor thread to repaint the video when a |
| 238 // frame available. It should be initialized on the compositor thread. | 245 // frame available. It should be initialized on the compositor thread. |
| 239 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; | 246 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; |
| 240 | 247 |
| 241 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 248 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 242 }; | 249 }; |
| 243 | 250 |
| 244 } // namespace webkit_media | 251 } // namespace webkit_media |
| 245 | 252 |
| 246 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 253 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |