| 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 <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 222   void OnVolumeMultiplierUpdate(double multiplier) override; | 222   void OnVolumeMultiplierUpdate(double multiplier) override; | 
| 223 | 223 | 
| 224  protected: | 224  protected: | 
| 225   // Helper method to update the playing state. | 225   // Helper method to update the playing state. | 
| 226   void UpdatePlayingState(bool is_playing_); | 226   void UpdatePlayingState(bool is_playing_); | 
| 227 | 227 | 
| 228   // Helper methods for posting task for setting states and update WebKit. | 228   // Helper methods for posting task for setting states and update WebKit. | 
| 229   void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 229   void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 
| 230   void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); | 230   void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); | 
| 231   void TryCreateStreamTextureProxyIfNeeded(); | 231   void TryCreateStreamTextureProxyIfNeeded(); | 
| 232   void DoCreateStreamTexture(); |  | 
| 233 | 232 | 
| 234   // Helper method to reestablish the surface texture peer for android | 233   // Helper method to reestablish the surface texture peer for android | 
| 235   // media player. | 234   // media player. | 
| 236   void EstablishSurfaceTexturePeer(); | 235   void EstablishSurfaceTexturePeer(); | 
| 237 | 236 | 
| 238   // Requesting whether the surface texture peer needs to be reestablished. | 237   // Requesting whether the surface texture peer needs to be reestablished. | 
| 239   void SetNeedsEstablishPeer(bool needs_establish_peer); | 238   void SetNeedsEstablishPeer(bool needs_establish_peer); | 
| 240 | 239 | 
| 241  private: | 240  private: | 
| 242   void InitializePlayer(const GURL& url, | 241   void InitializePlayer(const GURL& url, | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 341   blink::WebMediaPlayer::NetworkState network_state_; | 340   blink::WebMediaPlayer::NetworkState network_state_; | 
| 342   blink::WebMediaPlayer::ReadyState ready_state_; | 341   blink::WebMediaPlayer::ReadyState ready_state_; | 
| 343 | 342 | 
| 344   // GL texture ID allocated to the video. | 343   // GL texture ID allocated to the video. | 
| 345   unsigned int texture_id_; | 344   unsigned int texture_id_; | 
| 346 | 345 | 
| 347   // GL texture mailbox for texture_id_ to provide in the VideoFrame, and sync | 346   // GL texture mailbox for texture_id_ to provide in the VideoFrame, and sync | 
| 348   // point for when the mailbox was produced. | 347   // point for when the mailbox was produced. | 
| 349   gpu::Mailbox texture_mailbox_; | 348   gpu::Mailbox texture_mailbox_; | 
| 350 | 349 | 
| 351   // Stream texture ID allocated to the video. |  | 
| 352   unsigned int stream_id_; |  | 
| 353 |  | 
| 354   // Whether the media player has been initialized. | 350   // Whether the media player has been initialized. | 
| 355   bool is_player_initialized_; | 351   bool is_player_initialized_; | 
| 356 | 352 | 
| 357   // Whether the media player is playing. | 353   // Whether the media player is playing. | 
| 358   bool is_playing_; | 354   bool is_playing_; | 
| 359 | 355 | 
| 360   // Whether the media player is pending to play. | 356   // Whether the media player is pending to play. | 
| 361   bool is_play_pending_; | 357   bool is_play_pending_; | 
| 362 | 358 | 
| 363   // Whether media player needs to re-establish the surface texture peer. | 359   // Whether media player needs to re-establish the surface texture peer. | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 431 | 427 | 
| 432   // NOTE: Weak pointers must be invalidated before all other member variables. | 428   // NOTE: Weak pointers must be invalidated before all other member variables. | 
| 433   base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 429   base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 
| 434 | 430 | 
| 435   DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 431   DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 
| 436 }; | 432 }; | 
| 437 | 433 | 
| 438 }  // namespace content | 434 }  // namespace content | 
| 439 | 435 | 
| 440 #endif  // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 436 #endif  // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 
| OLD | NEW | 
|---|