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

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

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
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/blink/web_layer_impl.h"
24 #include "cc/layers/video_layer.h" 25 #include "cc/layers/video_layer.h"
25 #include "content/public/common/content_switches.h" 26 #include "content/public/common/content_switches.h"
26 #include "content/public/renderer/render_frame.h" 27 #include "content/public/renderer/render_frame.h"
27 #include "content/renderer/compositor_bindings/web_layer_impl.h"
28 #include "content/renderer/media/buffered_data_source.h" 28 #include "content/renderer/media/buffered_data_source.h"
29 #include "content/renderer/media/crypto/key_systems.h" 29 #include "content/renderer/media/crypto/key_systems.h"
30 #include "content/renderer/media/render_media_log.h" 30 #include "content/renderer/media/render_media_log.h"
31 #include "content/renderer/media/texttrack_impl.h" 31 #include "content/renderer/media/texttrack_impl.h"
32 #include "content/renderer/media/webaudiosourceprovider_impl.h" 32 #include "content/renderer/media/webaudiosourceprovider_impl.h"
33 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" 33 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
34 #include "content/renderer/media/webinbandtexttrack_impl.h" 34 #include "content/renderer/media/webinbandtexttrack_impl.h"
35 #include "content/renderer/media/webmediaplayer_delegate.h" 35 #include "content/renderer/media/webmediaplayer_delegate.h"
36 #include "content/renderer/media/webmediaplayer_params.h" 36 #include "content/renderer/media/webmediaplayer_params.h"
37 #include "content/renderer/media/webmediaplayer_util.h" 37 #include "content/renderer/media/webmediaplayer_util.h"
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 DCHECK(!video_weblayer_); 1010 DCHECK(!video_weblayer_);
1011 scoped_refptr<cc::VideoLayer> layer = 1011 scoped_refptr<cc::VideoLayer> layer =
1012 cc::VideoLayer::Create(compositor_, pipeline_metadata_.video_rotation); 1012 cc::VideoLayer::Create(compositor_, pipeline_metadata_.video_rotation);
1013 1013
1014 if (pipeline_metadata_.video_rotation == media::VIDEO_ROTATION_90 || 1014 if (pipeline_metadata_.video_rotation == media::VIDEO_ROTATION_90 ||
1015 pipeline_metadata_.video_rotation == media::VIDEO_ROTATION_270) { 1015 pipeline_metadata_.video_rotation == media::VIDEO_ROTATION_270) {
1016 gfx::Size size = pipeline_metadata_.natural_size; 1016 gfx::Size size = pipeline_metadata_.natural_size;
1017 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); 1017 pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width());
1018 } 1018 }
1019 1019
1020 video_weblayer_.reset(new WebLayerImpl(layer)); 1020 video_weblayer_.reset(new cc_blink::WebLayerImpl(layer));
1021 video_weblayer_->setOpaque(opaque_); 1021 video_weblayer_->setOpaque(opaque_);
1022 client_->setWebLayer(video_weblayer_.get()); 1022 client_->setWebLayer(video_weblayer_.get());
1023 } 1023 }
1024 } 1024 }
1025 1025
1026 void WebMediaPlayerImpl::OnPipelineBufferingStateChanged( 1026 void WebMediaPlayerImpl::OnPipelineBufferingStateChanged(
1027 media::BufferingState buffering_state) { 1027 media::BufferingState buffering_state) {
1028 DVLOG(1) << __FUNCTION__ << "(" << buffering_state << ")"; 1028 DVLOG(1) << __FUNCTION__ << "(" << buffering_state << ")";
1029 1029
1030 // Ignore buffering state changes until we've completed all outstanding seeks. 1030 // Ignore buffering state changes until we've completed all outstanding seeks.
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 compositor_task_runner_->PostTask(FROM_HERE, 1398 compositor_task_runner_->PostTask(FROM_HERE,
1399 base::Bind(&GetCurrentFrameAndSignal, 1399 base::Bind(&GetCurrentFrameAndSignal,
1400 base::Unretained(compositor_), 1400 base::Unretained(compositor_),
1401 &video_frame, 1401 &video_frame,
1402 &event)); 1402 &event));
1403 event.Wait(); 1403 event.Wait();
1404 return video_frame; 1404 return video_frame;
1405 } 1405 }
1406 1406
1407 } // namespace content 1407 } // 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