| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // TODO(qinmin): |frame| argument is used to determine whether the current | 80 // TODO(qinmin): |frame| argument is used to determine whether the current |
| 81 // player can enter fullscreen. This logic should probably be moved into | 81 // player can enter fullscreen. This logic should probably be moved into |
| 82 // blink, so that enterFullscreen() will not be called if another video is | 82 // blink, so that enterFullscreen() will not be called if another video is |
| 83 // already in fullscreen. | 83 // already in fullscreen. |
| 84 WebMediaPlayerAndroid( | 84 WebMediaPlayerAndroid( |
| 85 blink::WebFrame* frame, | 85 blink::WebFrame* frame, |
| 86 blink::WebMediaPlayerClient* client, | 86 blink::WebMediaPlayerClient* client, |
| 87 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, | 87 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, |
| 88 RendererMediaPlayerManager* player_manager, | 88 RendererMediaPlayerManager* player_manager, |
| 89 RendererCdmManager* cdm_manager, | 89 RendererCdmManager* cdm_manager, |
| 90 blink::WebContentDecryptionModule* initial_cdm, |
| 90 scoped_refptr<StreamTextureFactory> factory, | 91 scoped_refptr<StreamTextureFactory> factory, |
| 91 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 92 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 92 media::MediaLog* media_log); | 93 media::MediaLog* media_log); |
| 93 virtual ~WebMediaPlayerAndroid(); | 94 virtual ~WebMediaPlayerAndroid(); |
| 94 | 95 |
| 95 // blink::WebMediaPlayer implementation. | 96 // blink::WebMediaPlayer implementation. |
| 96 virtual void enterFullscreen(); | 97 virtual void enterFullscreen(); |
| 97 virtual bool canEnterFullscreen() const; | 98 virtual bool canEnterFullscreen() const; |
| 98 | 99 |
| 99 // Resource loading. | 100 // Resource loading. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 virtual MediaKeyException cancelKeyRequest( | 241 virtual MediaKeyException cancelKeyRequest( |
| 241 const blink::WebString& key_system, | 242 const blink::WebString& key_system, |
| 242 const blink::WebString& session_id); | 243 const blink::WebString& session_id); |
| 243 // TODO(jrummell): Remove this method once Blink updated to use the other | 244 // TODO(jrummell): Remove this method once Blink updated to use the other |
| 244 // two methods. | 245 // two methods. |
| 245 virtual void setContentDecryptionModule( | 246 virtual void setContentDecryptionModule( |
| 246 blink::WebContentDecryptionModule* cdm); | 247 blink::WebContentDecryptionModule* cdm); |
| 247 virtual void setContentDecryptionModule( | 248 virtual void setContentDecryptionModule( |
| 248 blink::WebContentDecryptionModule* cdm, | 249 blink::WebContentDecryptionModule* cdm, |
| 249 blink::WebContentDecryptionModuleResult result); | 250 blink::WebContentDecryptionModuleResult result); |
| 250 virtual void setContentDecryptionModuleSync( | |
| 251 blink::WebContentDecryptionModule* cdm); | |
| 252 | 251 |
| 253 void OnKeyAdded(const std::string& session_id); | 252 void OnKeyAdded(const std::string& session_id); |
| 254 void OnKeyError(const std::string& session_id, | 253 void OnKeyError(const std::string& session_id, |
| 255 media::MediaKeys::KeyError error_code, | 254 media::MediaKeys::KeyError error_code, |
| 256 uint32 system_code); | 255 uint32 system_code); |
| 257 void OnKeyMessage(const std::string& session_id, | 256 void OnKeyMessage(const std::string& session_id, |
| 258 const std::vector<uint8>& message, | 257 const std::vector<uint8>& message, |
| 259 const GURL& destination_url); | 258 const GURL& destination_url); |
| 260 | 259 |
| 261 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); | 260 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 505 |
| 507 // NOTE: Weak pointers must be invalidated before all other member variables. | 506 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 508 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 507 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 509 | 508 |
| 510 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 509 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 511 }; | 510 }; |
| 512 | 511 |
| 513 } // namespace content | 512 } // namespace content |
| 514 | 513 |
| 515 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 514 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |