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

Side by Side Diff: media/blink/webmediaplayer_cast_android.cc

Issue 1829923003: [Android,RemotePlayback] Resolve HTMLMediaElement.remote.connect() with false when device is not se… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-playback-connect
Patch Set: Rebased Created 4 years, 8 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
« no previous file with comments | « media/blink/webmediaplayer_cast_android.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "media/blink/webmediaplayer_cast_android.h" 5 #include "media/blink/webmediaplayer_cast_android.h"
6 6
7 #include "gpu/GLES2/gl2extchromium.h" 7 #include "gpu/GLES2/gl2extchromium.h"
8 #include "gpu/blink/webgraphicscontext3d_impl.h" 8 #include "gpu/blink/webgraphicscontext3d_impl.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "gpu/command_buffer/common/sync_token.h" 10 #include "gpu/command_buffer/common/sync_token.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 paused_ = true; 289 paused_ = true;
290 } 290 }
291 is_remote_ = false; 291 is_remote_ = false;
292 double t = currentTime(); 292 double t = currentTime();
293 if (t + media::kTimeUpdateInterval * 2 / 1000 > webmediaplayer_->duration()) { 293 if (t + media::kTimeUpdateInterval * 2 / 1000 > webmediaplayer_->duration()) {
294 t = webmediaplayer_->duration(); 294 t = webmediaplayer_->duration();
295 } 295 }
296 webmediaplayer_->OnDisconnectedFromRemoteDevice(t); 296 webmediaplayer_->OnDisconnectedFromRemoteDevice(t);
297 } 297 }
298 298
299 void WebMediaPlayerCast::OnCancelledRemotePlaybackRequest() {
300 DVLOG(1) << __FUNCTION__;
301 client_->cancelledRemotePlaybackRequest();
302 }
303
299 void WebMediaPlayerCast::OnDidExitFullscreen() { 304 void WebMediaPlayerCast::OnDidExitFullscreen() {
300 DVLOG(1) << __FUNCTION__; 305 DVLOG(1) << __FUNCTION__;
301 } 306 }
302 307
303 void WebMediaPlayerCast::OnMediaPlayerPlay() { 308 void WebMediaPlayerCast::OnMediaPlayerPlay() {
304 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; 309 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_;
305 initializing_ = false; 310 initializing_ = false;
306 if (is_remote_ && paused_) { 311 if (is_remote_ && paused_) {
307 paused_ = false; 312 paused_ = false;
308 remote_time_at_ = base::TimeTicks::Now(); 313 remote_time_at_ = base::TimeTicks::Now();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 375
371 if (!canvas_size.width()) 376 if (!canvas_size.width())
372 return nullptr; 377 return nullptr;
373 378
374 return MakeTextFrameForCast(remote_playback_message_, canvas_size, 379 return MakeTextFrameForCast(remote_playback_message_, canvas_size,
375 webmediaplayer_->naturalSize(), 380 webmediaplayer_->naturalSize(),
376 base::Bind(&GLCBShim, context_3d_cb_)); 381 base::Bind(&GLCBShim, context_3d_cb_));
377 } 382 }
378 383
379 } // namespace media 384 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_cast_android.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698