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

Side by Side Diff: media/renderers/renderer_impl.cc

Issue 2541803003: media: remove unused functions: Renderer::HasAudio()/HasVideo() (Closed)
Patch Set: cast Created 4 years 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/renderers/renderer_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderers/renderer_impl.h" 5 #include "media/renderers/renderer_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (audio_renderer_) 303 if (audio_renderer_)
304 audio_renderer_->SetVolume(volume); 304 audio_renderer_->SetVolume(volume);
305 } 305 }
306 306
307 base::TimeDelta RendererImpl::GetMediaTime() { 307 base::TimeDelta RendererImpl::GetMediaTime() {
308 // No BelongsToCurrentThread() checking because this can be called from other 308 // No BelongsToCurrentThread() checking because this can be called from other
309 // threads. 309 // threads.
310 return time_source_->CurrentMediaTime(); 310 return time_source_->CurrentMediaTime();
311 } 311 }
312 312
313 bool RendererImpl::HasAudio() {
314 DCHECK(task_runner_->BelongsToCurrentThread());
315 return audio_renderer_ != NULL;
316 }
317
318 bool RendererImpl::HasVideo() {
319 DCHECK(task_runner_->BelongsToCurrentThread());
320 return video_renderer_ != NULL;
321 }
322
323 void RendererImpl::DisableUnderflowForTesting() { 313 void RendererImpl::DisableUnderflowForTesting() {
324 DVLOG(1) << __func__; 314 DVLOG(1) << __func__;
325 DCHECK(task_runner_->BelongsToCurrentThread()); 315 DCHECK(task_runner_->BelongsToCurrentThread());
326 DCHECK_EQ(state_, STATE_UNINITIALIZED); 316 DCHECK_EQ(state_, STATE_UNINITIALIZED);
327 317
328 underflow_disabled_for_testing_ = true; 318 underflow_disabled_for_testing_ = true;
329 } 319 }
330 320
331 void RendererImpl::EnableClocklessVideoPlaybackForTesting() { 321 void RendererImpl::EnableClocklessVideoPlaybackForTesting() {
332 DVLOG(1) << __func__; 322 DVLOG(1) << __func__;
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 DCHECK(task_runner_->BelongsToCurrentThread()); 839 DCHECK(task_runner_->BelongsToCurrentThread());
850 client_->OnVideoNaturalSizeChange(size); 840 client_->OnVideoNaturalSizeChange(size);
851 } 841 }
852 842
853 void RendererImpl::OnVideoOpacityChange(bool opaque) { 843 void RendererImpl::OnVideoOpacityChange(bool opaque) {
854 DCHECK(task_runner_->BelongsToCurrentThread()); 844 DCHECK(task_runner_->BelongsToCurrentThread());
855 client_->OnVideoOpacityChange(opaque); 845 client_->OnVideoOpacityChange(opaque);
856 } 846 }
857 847
858 } // namespace media 848 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/renderer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698