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

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

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed the java enum comment Created 4 years, 1 month 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 UpdatePlayingState(true); 911 UpdatePlayingState(true);
912 client_->playbackStateChanged(); 912 client_->playbackStateChanged();
913 } 913 }
914 914
915 void WebMediaPlayerAndroid::OnMediaPlayerPause() { 915 void WebMediaPlayerAndroid::OnMediaPlayerPause() {
916 UpdatePlayingState(false); 916 UpdatePlayingState(false);
917 client_->playbackStateChanged(); 917 client_->playbackStateChanged();
918 } 918 }
919 919
920 void WebMediaPlayerAndroid::OnRemoteRouteAvailabilityChanged( 920 void WebMediaPlayerAndroid::OnRemoteRouteAvailabilityChanged(
921 bool routes_available) { 921 blink::WebRemotePlaybackAvailability availability) {
922 client_->remoteRouteAvailabilityChanged(routes_available); 922 client_->remoteRouteAvailabilityChanged(availability);
923 } 923 }
924 924
925 void WebMediaPlayerAndroid::UpdateNetworkState( 925 void WebMediaPlayerAndroid::UpdateNetworkState(
926 WebMediaPlayer::NetworkState state) { 926 WebMediaPlayer::NetworkState state) {
927 DCHECK(main_thread_checker_.CalledOnValidThread()); 927 DCHECK(main_thread_checker_.CalledOnValidThread());
928 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing && 928 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing &&
929 (state == WebMediaPlayer::NetworkStateNetworkError || 929 (state == WebMediaPlayer::NetworkStateNetworkError ||
930 state == WebMediaPlayer::NetworkStateDecodeError)) { 930 state == WebMediaPlayer::NetworkStateDecodeError)) {
931 // Any error that occurs before reaching ReadyStateHaveMetadata should 931 // Any error that occurs before reaching ReadyStateHaveMetadata should
932 // be considered a format error. 932 // be considered a format error.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1319 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1320 switches::kDisableMediaSuspend)) { 1320 switches::kDisableMediaSuspend)) {
1321 return false; 1321 return false;
1322 } 1322 }
1323 1323
1324 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && 1324 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) &&
1325 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); 1325 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden();
1326 } 1326 }
1327 1327
1328 } // namespace content 1328 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/webmediaplayer_ms_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698