| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 void OnKeyAdded(const std::string& session_id); | 247 void OnKeyAdded(const std::string& session_id); |
| 248 void OnKeyError(const std::string& session_id, | 248 void OnKeyError(const std::string& session_id, |
| 249 media::MediaKeys::KeyError error_code, | 249 media::MediaKeys::KeyError error_code, |
| 250 uint32 system_code); | 250 uint32 system_code); |
| 251 void OnKeyMessage(const std::string& session_id, | 251 void OnKeyMessage(const std::string& session_id, |
| 252 const std::vector<uint8>& message, | 252 const std::vector<uint8>& message, |
| 253 const GURL& destination_url); | 253 const GURL& destination_url); |
| 254 | 254 |
| 255 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); | 255 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); |
| 256 | 256 |
| 257 void OnNeedKey(const std::string& type, | 257 void OnNeedKey(const std::string& init_data_type, |
| 258 const std::vector<uint8>& init_data); | 258 const std::vector<uint8>& init_data); |
| 259 | 259 |
| 260 // TODO(xhwang): Implement WebMediaPlayer::setContentDecryptionModule(). | |
| 261 // See: http://crbug.com/224786 | |
| 262 | |
| 263 protected: | 260 protected: |
| 264 // Helper method to update the playing state. | 261 // Helper method to update the playing state. |
| 265 void UpdatePlayingState(bool is_playing_); | 262 void UpdatePlayingState(bool is_playing_); |
| 266 | 263 |
| 267 // Helper methods for posting task for setting states and update WebKit. | 264 // Helper methods for posting task for setting states and update WebKit. |
| 268 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); | 265 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); |
| 269 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); | 266 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); |
| 270 void TryCreateStreamTextureProxyIfNeeded(); | 267 void TryCreateStreamTextureProxyIfNeeded(); |
| 271 void DoCreateStreamTexture(); | 268 void DoCreateStreamTexture(); |
| 272 | 269 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 499 |
| 503 // NOTE: Weak pointers must be invalidated before all other member variables. | 500 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 504 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 501 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 505 | 502 |
| 506 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 503 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 507 }; | 504 }; |
| 508 | 505 |
| 509 } // namespace content | 506 } // namespace content |
| 510 | 507 |
| 511 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 508 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |