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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 887873003: media: Add DefaultMediaPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 10 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
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.cc ('k') | media/blink/webmediaplayer_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/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>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 context_3d_cb_(params.context_3d_cb()), 137 context_3d_cb_(params.context_3d_cb()),
138 supports_save_(true), 138 supports_save_(true),
139 chunk_demuxer_(NULL), 139 chunk_demuxer_(NULL),
140 compositor_task_runner_(params.compositor_task_runner()), 140 compositor_task_runner_(params.compositor_task_runner()),
141 compositor_(new VideoFrameCompositor( 141 compositor_(new VideoFrameCompositor(
142 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNaturalSizeChanged), 142 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNaturalSizeChanged),
143 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnOpacityChanged))), 143 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnOpacityChanged))),
144 encrypted_media_support_( 144 encrypted_media_support_(
145 cdm_factory.Pass(), 145 cdm_factory.Pass(),
146 client, 146 client,
147 params.media_permission(),
147 base::Bind(&WebMediaPlayerImpl::SetCdm, AsWeakPtr())), 148 base::Bind(&WebMediaPlayerImpl::SetCdm, AsWeakPtr())),
148 renderer_factory_(renderer_factory.Pass()) { 149 renderer_factory_(renderer_factory.Pass()) {
149 // Threaded compositing isn't enabled universally yet. 150 // Threaded compositing isn't enabled universally yet.
150 if (!compositor_task_runner_.get()) 151 if (!compositor_task_runner_.get())
151 compositor_task_runner_ = base::MessageLoopProxy::current(); 152 compositor_task_runner_ = base::MessageLoopProxy::current();
152 153
153 media_log_->AddEvent( 154 media_log_->AddEvent(
154 media_log_->CreateEvent(MediaLogEvent::WEBMEDIAPLAYER_CREATED)); 155 media_log_->CreateEvent(MediaLogEvent::WEBMEDIAPLAYER_CREATED));
155 156
156 if (params.initial_cdm()) { 157 if (params.initial_cdm()) {
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 999
999 // pause() may be called after playback has ended and the HTMLMediaElement 1000 // pause() may be called after playback has ended and the HTMLMediaElement
1000 // requires that currentTime() == duration() after ending. We want to ensure 1001 // requires that currentTime() == duration() after ending. We want to ensure
1001 // |paused_time_| matches currentTime() in this case or a future seek() may 1002 // |paused_time_| matches currentTime() in this case or a future seek() may
1002 // incorrectly discard what it thinks is a seek to the existing time. 1003 // incorrectly discard what it thinks is a seek to the existing time.
1003 paused_time_ = 1004 paused_time_ =
1004 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime(); 1005 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime();
1005 } 1006 }
1006 1007
1007 } // namespace media 1008 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.cc ('k') | media/blink/webmediaplayer_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698