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

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

Issue 275303002: Non-const impls. for WebMediaPlayer::didLoadingProgress(). (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
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>
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return duration(); 537 return duration();
538 } 538 }
539 539
540 bool WebMediaPlayerImpl::didLoadingProgress() const { 540 bool WebMediaPlayerImpl::didLoadingProgress() const {
541 DCHECK(main_loop_->BelongsToCurrentThread()); 541 DCHECK(main_loop_->BelongsToCurrentThread());
542 bool pipeline_progress = pipeline_.DidLoadingProgress(); 542 bool pipeline_progress = pipeline_.DidLoadingProgress();
543 bool data_progress = buffered_data_source_host_.DidLoadingProgress(); 543 bool data_progress = buffered_data_source_host_.DidLoadingProgress();
544 return pipeline_progress || data_progress; 544 return pipeline_progress || data_progress;
545 } 545 }
546 546
547 bool WebMediaPlayerImpl::didLoadingProgress() {
548 DCHECK(main_loop_->BelongsToCurrentThread());
549 bool pipeline_progress = pipeline_.DidLoadingProgress();
550 bool data_progress = buffered_data_source_host_.DidLoadingProgress();
551 return pipeline_progress || data_progress;
552 }
553
547 void WebMediaPlayerImpl::paint(WebCanvas* canvas, 554 void WebMediaPlayerImpl::paint(WebCanvas* canvas,
548 const WebRect& rect, 555 const WebRect& rect,
549 unsigned char alpha) { 556 unsigned char alpha) {
550 DCHECK(main_loop_->BelongsToCurrentThread()); 557 DCHECK(main_loop_->BelongsToCurrentThread());
551 TRACE_EVENT0("media", "WebMediaPlayerImpl:paint"); 558 TRACE_EVENT0("media", "WebMediaPlayerImpl:paint");
552 559
553 if (!accelerated_compositing_reported_) { 560 if (!accelerated_compositing_reported_) {
554 accelerated_compositing_reported_ = true; 561 accelerated_compositing_reported_ = true;
555 // Normally paint() is only called in non-accelerated rendering, but there 562 // Normally paint() is only called in non-accelerated rendering, but there
556 // are exceptions such as webgl where compositing is used in the WebView but 563 // are exceptions such as webgl where compositing is used in the WebView but
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 compositor_task_runner_->PostTask(FROM_HERE, 1385 compositor_task_runner_->PostTask(FROM_HERE,
1379 base::Bind(&GetCurrentFrameAndSignal, 1386 base::Bind(&GetCurrentFrameAndSignal,
1380 base::Unretained(compositor_), 1387 base::Unretained(compositor_),
1381 &video_frame, 1388 &video_frame,
1382 &event)); 1389 &event));
1383 event.Wait(); 1390 event.Wait();
1384 return video_frame; 1391 return video_frame;
1385 } 1392 }
1386 1393
1387 } // namespace content 1394 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698