| 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 15 matching lines...) Expand all Loading... |
| 26 #include "media/base/android/media_player_android.h" | 26 #include "media/base/android/media_player_android.h" |
| 27 #include "media/base/demuxer_stream.h" | 27 #include "media/base/demuxer_stream.h" |
| 28 #include "media/base/media_keys.h" | 28 #include "media/base/media_keys.h" |
| 29 #include "media/base/time_delta_interpolator.h" | 29 #include "media/base/time_delta_interpolator.h" |
| 30 #include "media/cdm/proxy_decryptor.h" | 30 #include "media/cdm/proxy_decryptor.h" |
| 31 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 31 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 32 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 32 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 33 #include "third_party/WebKit/public/platform/WebSize.h" | 33 #include "third_party/WebKit/public/platform/WebSize.h" |
| 34 #include "third_party/WebKit/public/platform/WebURL.h" | 34 #include "third_party/WebKit/public/platform/WebURL.h" |
| 35 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
| 36 #include "third_party/skia/include/gpu/GrContext.h" |
| 37 #include "third_party/skia/include/gpu/SkGrPixelRef.h" |
| 36 #include "ui/gfx/geometry/rect_f.h" | 38 #include "ui/gfx/geometry/rect_f.h" |
| 37 | 39 |
| 38 namespace base { | 40 namespace base { |
| 39 class SingleThreadTaskRunner; | 41 class SingleThreadTaskRunner; |
| 40 } | 42 } |
| 41 | 43 |
| 42 namespace blink { | 44 namespace blink { |
| 43 class WebContentDecryptionModule; | 45 class WebContentDecryptionModule; |
| 44 class WebContentDecryptionModuleResult; | 46 class WebContentDecryptionModuleResult; |
| 45 class WebFrame; | 47 class WebFrame; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // If |decryptor_ready_cb| is null, the existing callback will be fired with | 310 // If |decryptor_ready_cb| is null, the existing callback will be fired with |
| 309 // NULL immediately and reset. | 311 // NULL immediately and reset. |
| 310 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); | 312 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); |
| 311 | 313 |
| 312 // Called when the ContentDecryptionModule has been attached to the | 314 // Called when the ContentDecryptionModule has been attached to the |
| 313 // pipeline/decoders. | 315 // pipeline/decoders. |
| 314 void ContentDecryptionModuleAttached( | 316 void ContentDecryptionModuleAttached( |
| 315 blink::WebContentDecryptionModuleResult result, | 317 blink::WebContentDecryptionModuleResult result, |
| 316 bool success); | 318 bool success); |
| 317 | 319 |
| 320 bool EnsureTextureBackedSkBitmap(GrContext* gr, SkBitmap& bitmap, |
| 321 const blink::WebSize& size, |
| 322 GrSurfaceOrigin origin, |
| 323 GrPixelConfig config); |
| 324 |
| 318 bool IsHLSStream() const; | 325 bool IsHLSStream() const; |
| 319 | 326 |
| 320 blink::WebFrame* const frame_; | 327 blink::WebFrame* const frame_; |
| 321 | 328 |
| 322 blink::WebMediaPlayerClient* const client_; | 329 blink::WebMediaPlayerClient* const client_; |
| 323 | 330 |
| 324 // |delegate_| is used to notify the browser process of the player status, so | 331 // |delegate_| is used to notify the browser process of the player status, so |
| 325 // that the browser process can control screen locks. | 332 // that the browser process can control screen locks. |
| 326 // TODO(qinmin): Currently android mediaplayer takes care of the screen | 333 // TODO(qinmin): Currently android mediaplayer takes care of the screen |
| 327 // lock. So this is only used for media source. Will apply this to regular | 334 // lock. So this is only used for media source. Will apply this to regular |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 500 |
| 494 // NOTE: Weak pointers must be invalidated before all other member variables. | 501 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 495 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 502 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 496 | 503 |
| 497 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 504 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 498 }; | 505 }; |
| 499 | 506 |
| 500 } // namespace content | 507 } // namespace content |
| 501 | 508 |
| 502 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 509 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |