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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 275303002: Non-const impls. for WebMediaPlayer::didLoadingProgress(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove mutable bools. 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/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 double WebMediaPlayerAndroid::maxTimeSeekable() const { 442 double WebMediaPlayerAndroid::maxTimeSeekable() const {
443 // If we haven't even gotten to ReadyStateHaveMetadata yet then just 443 // If we haven't even gotten to ReadyStateHaveMetadata yet then just
444 // return 0 so that the seekable range is empty. 444 // return 0 so that the seekable range is empty.
445 if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata) 445 if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata)
446 return 0.0; 446 return 0.0;
447 447
448 return duration(); 448 return duration();
449 } 449 }
450 450
451 bool WebMediaPlayerAndroid::didLoadingProgress() const { 451 bool WebMediaPlayerAndroid::didLoadingProgress() const {
452 return const_cast<WebMediaPlayerAndroid*>(this)->didLoadingProgress();
453 }
454
455 bool WebMediaPlayerAndroid::didLoadingProgress() {
452 bool ret = did_loading_progress_; 456 bool ret = did_loading_progress_;
453 did_loading_progress_ = false; 457 did_loading_progress_ = false;
454 return ret; 458 return ret;
455 } 459 }
456 460
457 void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas, 461 void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas,
458 const blink::WebRect& rect, 462 const blink::WebRect& rect,
459 unsigned char alpha) { 463 unsigned char alpha) {
460 NOTIMPLEMENTED(); 464 NOTIMPLEMENTED();
461 } 465 }
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 1557
1554 void WebMediaPlayerAndroid::exitFullscreen() { 1558 void WebMediaPlayerAndroid::exitFullscreen() {
1555 manager_->ExitFullscreen(player_id_); 1559 manager_->ExitFullscreen(player_id_);
1556 } 1560 }
1557 1561
1558 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1562 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1559 return manager_->CanEnterFullscreen(frame_); 1563 return manager_->CanEnterFullscreen(frame_);
1560 } 1564 }
1561 1565
1562 } // namespace content 1566 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/buffered_data_source_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698