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

Side by Side Diff: media/base/pipeline.cc

Issue 282073003: Add return-by-value implementations of blink::WebMediaPlayer::buffered() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/base/pipeline.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 task_runner_->PostTask(FROM_HERE, base::Bind( 152 task_runner_->PostTask(FROM_HERE, base::Bind(
153 &Pipeline::VolumeChangedTask, base::Unretained(this), volume)); 153 &Pipeline::VolumeChangedTask, base::Unretained(this), volume));
154 } 154 }
155 } 155 }
156 156
157 TimeDelta Pipeline::GetMediaTime() const { 157 TimeDelta Pipeline::GetMediaTime() const {
158 base::AutoLock auto_lock(lock_); 158 base::AutoLock auto_lock(lock_);
159 return clock_->Elapsed(); 159 return clock_->Elapsed();
160 } 160 }
161 161
162 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() { 162 Ranges<TimeDelta> Pipeline::GetBufferedTimeRanges() const {
163 base::AutoLock auto_lock(lock_); 163 base::AutoLock auto_lock(lock_);
164 return buffered_time_ranges_; 164 return buffered_time_ranges_;
165 } 165 }
166 166
167 TimeDelta Pipeline::GetMediaDuration() const { 167 TimeDelta Pipeline::GetMediaDuration() const {
168 base::AutoLock auto_lock(lock_); 168 base::AutoLock auto_lock(lock_);
169 return clock_->Duration(); 169 return clock_->Duration();
170 } 170 }
171 171
172 bool Pipeline::DidLoadingProgress() { 172 bool Pipeline::DidLoadingProgress() {
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 964 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
965 lock_.AssertAcquired(); 965 lock_.AssertAcquired();
966 if (!waiting_for_clock_update_) 966 if (!waiting_for_clock_update_)
967 return; 967 return;
968 968
969 waiting_for_clock_update_ = false; 969 waiting_for_clock_update_ = false;
970 clock_->Play(); 970 clock_->Play();
971 } 971 }
972 972
973 } // namespace media 973 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698