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

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

Issue 2464163004: [RemotePlayback] Implement 'connecting' state (Closed)
Patch Set: Fixed mocks 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 is_remote_ = false; 869 is_remote_ = false;
870 ReallocateVideoFrame(); 870 ReallocateVideoFrame();
871 client_->disconnectedFromRemoteDevice(); 871 client_->disconnectedFromRemoteDevice();
872 } 872 }
873 873
874 void WebMediaPlayerAndroid::OnCancelledRemotePlaybackRequest() { 874 void WebMediaPlayerAndroid::OnCancelledRemotePlaybackRequest() {
875 DCHECK(main_thread_checker_.CalledOnValidThread()); 875 DCHECK(main_thread_checker_.CalledOnValidThread());
876 client_->cancelledRemotePlaybackRequest(); 876 client_->cancelledRemotePlaybackRequest();
877 } 877 }
878 878
879 void WebMediaPlayerAndroid::OnRemotePlaybackStarted() {
880 DCHECK(main_thread_checker_.CalledOnValidThread());
881 client_->remotePlaybackStarted();
882 }
mlamouri (slow - plz ping) 2016/11/03 16:17:48 Nice of you to think about our old friend WMPA :)
883
879 void WebMediaPlayerAndroid::OnDidExitFullscreen() { 884 void WebMediaPlayerAndroid::OnDidExitFullscreen() {
880 SetNeedsEstablishPeer(true); 885 SetNeedsEstablishPeer(true);
881 // We had the fullscreen surface connected to Android MediaPlayer, 886 // We had the fullscreen surface connected to Android MediaPlayer,
882 // so reconnect our surface texture for embedded playback. 887 // so reconnect our surface texture for embedded playback.
883 if (!paused() && needs_establish_peer_) { 888 if (!paused() && needs_establish_peer_) {
884 TryCreateStreamTextureProxyIfNeeded(); 889 TryCreateStreamTextureProxyIfNeeded();
885 EstablishSurfaceTexturePeer(); 890 EstablishSurfaceTexturePeer();
886 suppress_deleting_texture_ = true; 891 suppress_deleting_texture_ = true;
887 } 892 }
888 893
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1313 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1309 switches::kDisableMediaSuspend)) { 1314 switches::kDisableMediaSuspend)) {
1310 return false; 1315 return false;
1311 } 1316 }
1312 1317
1313 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && 1318 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) &&
1314 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); 1319 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden();
1315 } 1320 }
1316 1321
1317 } // namespace content 1322 } // 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