Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing dependencies due to failing ios bots Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_impl.h" 5 #include "content/renderer/media/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/callback_helpers.h" 14 #include "base/callback_helpers.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/debug/alias.h" 16 #include "base/debug/alias.h"
17 #include "base/debug/crash_logging.h" 17 #include "base/debug/crash_logging.h"
18 #include "base/debug/trace_event.h" 18 #include "base/debug/trace_event.h"
19 #include "base/message_loop/message_loop_proxy.h" 19 #include "base/message_loop/message_loop_proxy.h"
20 #include "base/metrics/histogram.h" 20 #include "base/metrics/histogram.h"
21 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
23 #include "base/synchronization/waitable_event.h" 23 #include "base/synchronization/waitable_event.h"
24 #include "cc/layers/video_layer.h" 24 #include "cc/layers/video_layer.h"
25 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
26 #include "content/public/renderer/render_frame.h" 26 #include "content/public/renderer/render_frame.h"
27 #include "content/renderer/compositor_bindings/web_layer_impl.h"
27 #include "content/renderer/media/buffered_data_source.h" 28 #include "content/renderer/media/buffered_data_source.h"
28 #include "content/renderer/media/crypto/key_systems.h" 29 #include "content/renderer/media/crypto/key_systems.h"
29 #include "content/renderer/media/render_media_log.h" 30 #include "content/renderer/media/render_media_log.h"
30 #include "content/renderer/media/texttrack_impl.h" 31 #include "content/renderer/media/texttrack_impl.h"
31 #include "content/renderer/media/webaudiosourceprovider_impl.h" 32 #include "content/renderer/media/webaudiosourceprovider_impl.h"
32 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" 33 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
33 #include "content/renderer/media/webinbandtexttrack_impl.h" 34 #include "content/renderer/media/webinbandtexttrack_impl.h"
34 #include "content/renderer/media/webmediaplayer_delegate.h" 35 #include "content/renderer/media/webmediaplayer_delegate.h"
35 #include "content/renderer/media/webmediaplayer_params.h" 36 #include "content/renderer/media/webmediaplayer_params.h"
36 #include "content/renderer/media/webmediaplayer_util.h" 37 #include "content/renderer/media/webmediaplayer_util.h"
(...skipping 27 matching lines...) Expand all
64 #include "third_party/WebKit/public/platform/WebRect.h" 65 #include "third_party/WebKit/public/platform/WebRect.h"
65 #include "third_party/WebKit/public/platform/WebSize.h" 66 #include "third_party/WebKit/public/platform/WebSize.h"
66 #include "third_party/WebKit/public/platform/WebString.h" 67 #include "third_party/WebKit/public/platform/WebString.h"
67 #include "third_party/WebKit/public/platform/WebURL.h" 68 #include "third_party/WebKit/public/platform/WebURL.h"
68 #include "third_party/WebKit/public/web/WebDocument.h" 69 #include "third_party/WebKit/public/web/WebDocument.h"
69 #include "third_party/WebKit/public/web/WebLocalFrame.h" 70 #include "third_party/WebKit/public/web/WebLocalFrame.h"
70 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 71 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
71 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 72 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
72 #include "third_party/WebKit/public/web/WebView.h" 73 #include "third_party/WebKit/public/web/WebView.h"
73 #include "v8/include/v8.h" 74 #include "v8/include/v8.h"
74 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
75 75
76 #if defined(ENABLE_PEPPER_CDMS) 76 #if defined(ENABLE_PEPPER_CDMS)
77 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" 77 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
78 #endif 78 #endif
79 79
80 using blink::WebCanvas; 80 using blink::WebCanvas;
81 using blink::WebMediaPlayer; 81 using blink::WebMediaPlayer;
82 using blink::WebRect; 82 using blink::WebRect;
83 using blink::WebSize; 83 using blink::WebSize;
84 using blink::WebString; 84 using blink::WebString;
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 media::PipelineMetadata metadata) { 957 media::PipelineMetadata metadata) {
958 DVLOG(1) << __FUNCTION__; 958 DVLOG(1) << __FUNCTION__;
959 959
960 pipeline_metadata_ = metadata; 960 pipeline_metadata_ = metadata;
961 961
962 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); 962 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
963 963
964 if (hasVideo()) { 964 if (hasVideo()) {
965 DCHECK(!video_weblayer_); 965 DCHECK(!video_weblayer_);
966 video_weblayer_.reset( 966 video_weblayer_.reset(
967 new webkit::WebLayerImpl(cc::VideoLayer::Create(compositor_))); 967 new WebLayerImpl(cc::VideoLayer::Create(compositor_)));
968 video_weblayer_->setOpaque(opaque_); 968 video_weblayer_->setOpaque(opaque_);
969 client_->setWebLayer(video_weblayer_.get()); 969 client_->setWebLayer(video_weblayer_.get());
970 } 970 }
971 971
972 // TODO(scherkus): This should be handled by HTMLMediaElement and controls 972 // TODO(scherkus): This should be handled by HTMLMediaElement and controls
973 // should know when to invalidate themselves http://crbug.com/337015 973 // should know when to invalidate themselves http://crbug.com/337015
974 InvalidateOnMainThread(); 974 InvalidateOnMainThread();
975 } 975 }
976 976
977 void WebMediaPlayerImpl::OnPipelinePrerollCompleted() { 977 void WebMediaPlayerImpl::OnPipelinePrerollCompleted() {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 compositor_task_runner_->PostTask(FROM_HERE, 1347 compositor_task_runner_->PostTask(FROM_HERE,
1348 base::Bind(&GetCurrentFrameAndSignal, 1348 base::Bind(&GetCurrentFrameAndSignal,
1349 base::Unretained(compositor_), 1349 base::Unretained(compositor_),
1350 &video_frame, 1350 &video_frame,
1351 &event)); 1351 &event));
1352 event.Wait(); 1352 event.Wait();
1353 return video_frame; 1353 return video_frame;
1354 } 1354 }
1355 1355
1356 } // namespace content 1356 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698