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

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

Issue 2464163004: [RemotePlayback] Implement 'connecting' state (Closed)
Patch Set: Rebased 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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 is_remote_ = false; 873 is_remote_ = false;
874 ReallocateVideoFrame(); 874 ReallocateVideoFrame();
875 client_->disconnectedFromRemoteDevice(); 875 client_->disconnectedFromRemoteDevice();
876 } 876 }
877 877
878 void WebMediaPlayerAndroid::OnCancelledRemotePlaybackRequest() { 878 void WebMediaPlayerAndroid::OnCancelledRemotePlaybackRequest() {
879 DCHECK(main_thread_checker_.CalledOnValidThread()); 879 DCHECK(main_thread_checker_.CalledOnValidThread());
880 client_->cancelledRemotePlaybackRequest(); 880 client_->cancelledRemotePlaybackRequest();
881 } 881 }
882 882
883 void WebMediaPlayerAndroid::OnRemotePlaybackStarted() {
884 DCHECK(main_thread_checker_.CalledOnValidThread());
885 client_->remotePlaybackStarted();
886 }
887
883 void WebMediaPlayerAndroid::OnDidExitFullscreen() { 888 void WebMediaPlayerAndroid::OnDidExitFullscreen() {
884 SetNeedsEstablishPeer(true); 889 SetNeedsEstablishPeer(true);
885 // We had the fullscreen surface connected to Android MediaPlayer, 890 // We had the fullscreen surface connected to Android MediaPlayer,
886 // so reconnect our surface texture for embedded playback. 891 // so reconnect our surface texture for embedded playback.
887 if (!paused() && needs_establish_peer_) { 892 if (!paused() && needs_establish_peer_) {
888 TryCreateStreamTextureProxyIfNeeded(); 893 TryCreateStreamTextureProxyIfNeeded();
889 EstablishSurfaceTexturePeer(); 894 EstablishSurfaceTexturePeer();
890 suppress_deleting_texture_ = true; 895 suppress_deleting_texture_ = true;
891 } 896 }
892 897
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1317 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1313 switches::kDisableMediaSuspend)) { 1318 switches::kDisableMediaSuspend)) {
1314 return false; 1319 return false;
1315 } 1320 }
1316 1321
1317 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && 1322 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) &&
1318 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); 1323 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden();
1319 } 1324 }
1320 1325
1321 } // namespace content 1326 } // 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