| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 uint32 system_code); | 251 uint32 system_code); |
| 252 void OnKeyMessage(const std::string& session_id, | 252 void OnKeyMessage(const std::string& session_id, |
| 253 const std::vector<uint8>& message, | 253 const std::vector<uint8>& message, |
| 254 const GURL& destination_url); | 254 const GURL& destination_url); |
| 255 | 255 |
| 256 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); | 256 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); |
| 257 | 257 |
| 258 void OnEncryptedMediaInitData(const std::string& init_data_type, | 258 void OnEncryptedMediaInitData(const std::string& init_data_type, |
| 259 const std::vector<uint8>& init_data); | 259 const std::vector<uint8>& init_data); |
| 260 | 260 |
| 261 // Called when a decoder detects that the key needed to decrypt the stream |
| 262 // is not available. |
| 263 void OnWaitingForDecryptionKey(); |
| 264 |
| 261 protected: | 265 protected: |
| 262 // Helper method to update the playing state. | 266 // Helper method to update the playing state. |
| 263 void UpdatePlayingState(bool is_playing_); | 267 void UpdatePlayingState(bool is_playing_); |
| 264 | 268 |
| 265 // Helper methods for posting task for setting states and update WebKit. | 269 // Helper methods for posting task for setting states and update WebKit. |
| 266 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 270 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); |
| 267 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); | 271 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); |
| 268 void TryCreateStreamTextureProxyIfNeeded(); | 272 void TryCreateStreamTextureProxyIfNeeded(); |
| 269 void DoCreateStreamTexture(); | 273 void DoCreateStreamTexture(); |
| 270 | 274 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 509 |
| 506 // NOTE: Weak pointers must be invalidated before all other member variables. | 510 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 507 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 511 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 508 | 512 |
| 509 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 513 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 510 }; | 514 }; |
| 511 | 515 |
| 512 } // namespace content | 516 } // namespace content |
| 513 | 517 |
| 514 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 518 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |