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

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

Issue 2538853002: Media Remoting: Draw remoting interstitial on poster image. (Closed)
Patch Set: Addressed comments. Created 3 years, 12 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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 if (!video_weblayer_) 1440 if (!video_weblayer_)
1441 return pipeline_metadata_.natural_size; 1441 return pipeline_metadata_.natural_size;
1442 1442
1443 return video_weblayer_->bounds(); 1443 return video_weblayer_->bounds();
1444 } 1444 }
1445 1445
1446 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) { 1446 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) {
1447 cast_impl_.SetDeviceScaleFactor(scale_factor); 1447 cast_impl_.SetDeviceScaleFactor(scale_factor);
1448 } 1448 }
1449 1449
1450 void WebMediaPlayerImpl::setPoster(const blink::WebURL& poster) {
1451 cast_impl_.setPoster(poster);
1452 }
1453
1454 void WebMediaPlayerImpl::SetUseFallbackPath(bool use_fallback_path) { 1450 void WebMediaPlayerImpl::SetUseFallbackPath(bool use_fallback_path) {
1455 use_fallback_path_ = use_fallback_path; 1451 use_fallback_path_ = use_fallback_path;
1456 } 1452 }
1457 #endif // defined(OS_ANDROID) // WMPI_CAST 1453 #endif // defined(OS_ANDROID) // WMPI_CAST
1458 1454
1455 void WebMediaPlayerImpl::setPoster(const blink::WebURL& poster) {
1456 #if defined(OS_ANDROID)
1457 cast_impl_.setPoster(poster);
1458 #endif
1459
1460 if (observer_)
1461 observer_->OnSetPoster(poster);
1462 }
1463
1459 void WebMediaPlayerImpl::DataSourceInitialized(bool success) { 1464 void WebMediaPlayerImpl::DataSourceInitialized(bool success) {
1460 DVLOG(1) << __func__; 1465 DVLOG(1) << __func__;
1461 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1466 DCHECK(main_task_runner_->BelongsToCurrentThread());
1462 1467
1463 #if defined(OS_ANDROID) 1468 #if defined(OS_ANDROID)
1464 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are 1469 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are
1465 // encountered, instruct the HTML media element to create a new WebMediaPlayer 1470 // encountered, instruct the HTML media element to create a new WebMediaPlayer
1466 // instance with the correct URL to trigger WebMediaPlayerAndroid creation. 1471 // instance with the correct URL to trigger WebMediaPlayerAndroid creation.
1467 // 1472 //
1468 // TODO(tguilbert): Remove this code path once we have the ability to host a 1473 // TODO(tguilbert): Remove this code path once we have the ability to host a
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 pipeline_metadata_.natural_size, 1960 pipeline_metadata_.natural_size,
1956 base::Bind(&GetCurrentTimeInternal, this))); 1961 base::Bind(&GetCurrentTimeInternal, this)));
1957 watch_time_reporter_->OnVolumeChange(volume_); 1962 watch_time_reporter_->OnVolumeChange(volume_);
1958 if (delegate_ && delegate_->IsHidden()) 1963 if (delegate_ && delegate_->IsHidden())
1959 watch_time_reporter_->OnHidden(); 1964 watch_time_reporter_->OnHidden();
1960 else 1965 else
1961 watch_time_reporter_->OnShown(); 1966 watch_time_reporter_->OnShown();
1962 } 1967 }
1963 1968
1964 } // namespace media 1969 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698