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 #include "content/renderer/media/webmediaplayer_ms.h" | 5 #include "content/renderer/media/webmediaplayer_ms.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "cc/blink/context_provider_web_context.h" |
13 #include "cc/blink/web_layer_impl.h" | 14 #include "cc/blink/web_layer_impl.h" |
14 #include "cc/layers/video_layer.h" | 15 #include "cc/layers/video_layer.h" |
15 #include "content/public/renderer/render_view.h" | 16 #include "content/public/renderer/render_view.h" |
16 #include "content/renderer/media/media_stream_audio_renderer.h" | 17 #include "content/renderer/media/media_stream_audio_renderer.h" |
17 #include "content/renderer/media/media_stream_renderer_factory.h" | 18 #include "content/renderer/media/media_stream_renderer_factory.h" |
18 #include "content/renderer/media/video_frame_provider.h" | 19 #include "content/renderer/media/video_frame_provider.h" |
19 #include "content/renderer/render_frame_impl.h" | 20 #include "content/renderer/render_frame_impl.h" |
20 #include "content/renderer/render_thread_impl.h" | 21 #include "content/renderer/render_thread_impl.h" |
21 #include "gpu/blink/webgraphicscontext3d_impl.h" | 22 #include "gpu/blink/webgraphicscontext3d_impl.h" |
22 #include "media/base/media_log.h" | 23 #include "media/base/media_log.h" |
23 #include "media/base/video_frame.h" | 24 #include "media/base/video_frame.h" |
24 #include "media/base/video_rotation.h" | 25 #include "media/base/video_rotation.h" |
25 #include "media/base/video_util.h" | 26 #include "media/base/video_util.h" |
26 #include "media/blink/webmediaplayer_delegate.h" | 27 #include "media/blink/webmediaplayer_delegate.h" |
27 #include "media/blink/webmediaplayer_util.h" | 28 #include "media/blink/webmediaplayer_util.h" |
28 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 29 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
29 #include "third_party/WebKit/public/platform/WebRect.h" | 30 #include "third_party/WebKit/public/platform/WebRect.h" |
30 #include "third_party/WebKit/public/platform/WebSize.h" | 31 #include "third_party/WebKit/public/platform/WebSize.h" |
31 #include "third_party/WebKit/public/platform/WebURL.h" | 32 #include "third_party/WebKit/public/platform/WebURL.h" |
32 #include "third_party/WebKit/public/web/WebFrame.h" | 33 #include "third_party/WebKit/public/web/WebFrame.h" |
33 #include "third_party/WebKit/public/web/WebView.h" | 34 #include "third_party/WebKit/public/web/WebView.h" |
34 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
35 #include "webkit/common/gpu/context_provider_web_context.h" | |
36 | 36 |
37 using blink::WebCanvas; | 37 using blink::WebCanvas; |
38 using blink::WebMediaPlayer; | 38 using blink::WebMediaPlayer; |
39 using blink::WebRect; | 39 using blink::WebRect; |
40 using blink::WebSize; | 40 using blink::WebSize; |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 // This function copies a YV12 or NATIVE_TEXTURE to a new YV12 | 44 // This function copies a YV12 or NATIVE_TEXTURE to a new YV12 |
45 // media::VideoFrame. | 45 // media::VideoFrame. |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 GetClient()->readyStateChanged(); | 522 GetClient()->readyStateChanged(); |
523 } | 523 } |
524 | 524 |
525 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { | 525 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { |
526 DCHECK(thread_checker_.CalledOnValidThread()); | 526 DCHECK(thread_checker_.CalledOnValidThread()); |
527 DCHECK(client_); | 527 DCHECK(client_); |
528 return client_; | 528 return client_; |
529 } | 529 } |
530 | 530 |
531 } // namespace content | 531 } // namespace content |
OLD | NEW |