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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 namespace base { | 40 namespace base { |
41 class SingleThreadTaskRunner; | 41 class SingleThreadTaskRunner; |
42 } | 42 } |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 class WebContentDecryptionModule; | 45 class WebContentDecryptionModule; |
46 class WebContentDecryptionModuleResult; | 46 class WebContentDecryptionModuleResult; |
47 class WebFrame; | 47 class WebFrame; |
48 class WebMediaPlayerClient; | 48 class WebMediaPlayerClient; |
| 49 class WebMediaPlayerEncryptedMediaClient; |
49 class WebURL; | 50 class WebURL; |
50 } | 51 } |
51 | 52 |
52 namespace cc_blink { | 53 namespace cc_blink { |
53 class WebLayerImpl; | 54 class WebLayerImpl; |
54 } | 55 } |
55 | 56 |
56 namespace gpu { | 57 namespace gpu { |
57 struct MailboxHolder; | 58 struct MailboxHolder; |
58 } | 59 } |
(...skipping 23 matching lines...) Expand all Loading... |
82 public: | 83 public: |
83 // Construct a WebMediaPlayerAndroid object. This class communicates with the | 84 // Construct a WebMediaPlayerAndroid object. This class communicates with the |
84 // MediaPlayerAndroid object in the browser process through |proxy|. | 85 // MediaPlayerAndroid object in the browser process through |proxy|. |
85 // TODO(qinmin): |frame| argument is used to determine whether the current | 86 // TODO(qinmin): |frame| argument is used to determine whether the current |
86 // player can enter fullscreen. This logic should probably be moved into | 87 // player can enter fullscreen. This logic should probably be moved into |
87 // blink, so that enterFullscreen() will not be called if another video is | 88 // blink, so that enterFullscreen() will not be called if another video is |
88 // already in fullscreen. | 89 // already in fullscreen. |
89 WebMediaPlayerAndroid( | 90 WebMediaPlayerAndroid( |
90 blink::WebFrame* frame, | 91 blink::WebFrame* frame, |
91 blink::WebMediaPlayerClient* client, | 92 blink::WebMediaPlayerClient* client, |
| 93 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
92 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, | 94 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, |
93 RendererMediaPlayerManager* player_manager, | 95 RendererMediaPlayerManager* player_manager, |
94 media::CdmFactory* cdm_factory, | 96 media::CdmFactory* cdm_factory, |
95 media::MediaPermission* media_permission, | 97 media::MediaPermission* media_permission, |
96 blink::WebContentDecryptionModule* initial_cdm, | 98 blink::WebContentDecryptionModule* initial_cdm, |
97 scoped_refptr<StreamTextureFactory> factory, | 99 scoped_refptr<StreamTextureFactory> factory, |
98 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 100 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
99 media::MediaLog* media_log); | 101 media::MediaLog* media_log); |
100 virtual ~WebMediaPlayerAndroid(); | 102 virtual ~WebMediaPlayerAndroid(); |
101 | 103 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // pipeline/decoders. | 335 // pipeline/decoders. |
334 void ContentDecryptionModuleAttached( | 336 void ContentDecryptionModuleAttached( |
335 blink::WebContentDecryptionModuleResult result, | 337 blink::WebContentDecryptionModuleResult result, |
336 bool success); | 338 bool success); |
337 | 339 |
338 bool IsHLSStream() const; | 340 bool IsHLSStream() const; |
339 | 341 |
340 blink::WebFrame* const frame_; | 342 blink::WebFrame* const frame_; |
341 | 343 |
342 blink::WebMediaPlayerClient* const client_; | 344 blink::WebMediaPlayerClient* const client_; |
| 345 blink::WebMediaPlayerEncryptedMediaClient* const encrypted_client_; |
343 | 346 |
344 // |delegate_| is used to notify the browser process of the player status, so | 347 // |delegate_| is used to notify the browser process of the player status, so |
345 // that the browser process can control screen locks. | 348 // that the browser process can control screen locks. |
346 // TODO(qinmin): Currently android mediaplayer takes care of the screen | 349 // TODO(qinmin): Currently android mediaplayer takes care of the screen |
347 // lock. So this is only used for media source. Will apply this to regular | 350 // lock. So this is only used for media source. Will apply this to regular |
348 // media tag once http://crbug.com/247892 is fixed. | 351 // media tag once http://crbug.com/247892 is fixed. |
349 base::WeakPtr<media::WebMediaPlayerDelegate> delegate_; | 352 base::WeakPtr<media::WebMediaPlayerDelegate> delegate_; |
350 | 353 |
351 // Save the list of buffered time ranges. | 354 // Save the list of buffered time ranges. |
352 blink::WebTimeRanges buffered_; | 355 blink::WebTimeRanges buffered_; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 520 |
518 // NOTE: Weak pointers must be invalidated before all other member variables. | 521 // NOTE: Weak pointers must be invalidated before all other member variables. |
519 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 522 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
520 | 523 |
521 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 524 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
522 }; | 525 }; |
523 | 526 |
524 } // namespace content | 527 } // namespace content |
525 | 528 |
526 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 529 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |