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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // player can enter fullscreen. This logic should probably be moved into | 70 // player can enter fullscreen. This logic should probably be moved into |
71 // blink, so that enterFullscreen() will not be called if another video is | 71 // blink, so that enterFullscreen() will not be called if another video is |
72 // already in fullscreen. | 72 // already in fullscreen. |
73 WebMediaPlayerAndroid( | 73 WebMediaPlayerAndroid( |
74 WebKit::WebFrame* frame, | 74 WebKit::WebFrame* frame, |
75 WebKit::WebMediaPlayerClient* client, | 75 WebKit::WebMediaPlayerClient* client, |
76 base::WeakPtr<WebMediaPlayerDelegate> delegate, | 76 base::WeakPtr<WebMediaPlayerDelegate> delegate, |
77 RendererMediaPlayerManager* manager, | 77 RendererMediaPlayerManager* manager, |
78 WebMediaPlayerProxyAndroid* proxy, | 78 WebMediaPlayerProxyAndroid* proxy, |
79 StreamTextureFactory* factory, | 79 StreamTextureFactory* factory, |
| 80 const scoped_refptr<base::MessageLoopProxy>& media_loop, |
80 media::MediaLog* media_log); | 81 media::MediaLog* media_log); |
81 virtual ~WebMediaPlayerAndroid(); | 82 virtual ~WebMediaPlayerAndroid(); |
82 | 83 |
83 // WebKit::WebMediaPlayer implementation. | 84 // WebKit::WebMediaPlayer implementation. |
84 virtual void enterFullscreen(); | 85 virtual void enterFullscreen(); |
85 virtual void exitFullscreen(); | 86 virtual void exitFullscreen(); |
86 virtual bool canEnterFullscreen() const; | 87 virtual bool canEnterFullscreen() const; |
87 | 88 |
88 // Resource loading. | 89 // Resource loading. |
89 virtual void load(LoadType load_type, | 90 virtual void load(LoadType load_type, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 297 |
297 // Size that has been sent to StreamTexture. | 298 // Size that has been sent to StreamTexture. |
298 WebKit::WebSize cached_stream_texture_size_; | 299 WebKit::WebSize cached_stream_texture_size_; |
299 | 300 |
300 // The video frame object used for rendering by the compositor. | 301 // The video frame object used for rendering by the compositor. |
301 scoped_refptr<media::VideoFrame> current_frame_; | 302 scoped_refptr<media::VideoFrame> current_frame_; |
302 | 303 |
303 // Message loop for main renderer thread. | 304 // Message loop for main renderer thread. |
304 const scoped_refptr<base::MessageLoopProxy> main_loop_; | 305 const scoped_refptr<base::MessageLoopProxy> main_loop_; |
305 | 306 |
| 307 // Message loop for media thread. |
| 308 const scoped_refptr<base::MessageLoopProxy> media_loop_; |
| 309 |
306 // URL of the media file to be fetched. | 310 // URL of the media file to be fetched. |
307 GURL url_; | 311 GURL url_; |
308 | 312 |
309 // Media duration. | 313 // Media duration. |
310 base::TimeDelta duration_; | 314 base::TimeDelta duration_; |
311 | 315 |
312 // Flag to remember if we have a trusted duration_ value provided by | 316 // Flag to remember if we have a trusted duration_ value provided by |
313 // MediaSourceDelegate notifying OnDurationChange(). In this case, ignore | 317 // MediaSourceDelegate notifying OnDurationChange(). In this case, ignore |
314 // any subsequent duration value passed to OnMediaMetadataChange(). | 318 // any subsequent duration value passed to OnMediaMetadataChange(). |
315 bool ignore_metadata_duration_change_; | 319 bool ignore_metadata_duration_change_; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 425 |
422 // The decryptor that manages decryption keys and decrypts encrypted frames. | 426 // The decryptor that manages decryption keys and decrypts encrypted frames. |
423 scoped_ptr<ProxyDecryptor> decryptor_; | 427 scoped_ptr<ProxyDecryptor> decryptor_; |
424 | 428 |
425 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 429 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
426 }; | 430 }; |
427 | 431 |
428 } // namespace content | 432 } // namespace content |
429 | 433 |
430 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 434 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |