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

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

Issue 1987373003: Implement setPoster for WMPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: declare WebURL Created 4 years, 7 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_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 gfx::Size WebMediaPlayerImpl::GetCanvasSize() const { 1207 gfx::Size WebMediaPlayerImpl::GetCanvasSize() const {
1208 if (!video_weblayer_) 1208 if (!video_weblayer_)
1209 return pipeline_metadata_.natural_size; 1209 return pipeline_metadata_.natural_size;
1210 1210
1211 return video_weblayer_->bounds(); 1211 return video_weblayer_->bounds();
1212 } 1212 }
1213 1213
1214 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) { 1214 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) {
1215 cast_impl_.SetDeviceScaleFactor(scale_factor); 1215 cast_impl_.SetDeviceScaleFactor(scale_factor);
1216 } 1216 }
1217
1218 void WebMediaPlayerImpl::setPoster(const blink::WebURL& poster) {
1219 cast_impl_.setPoster(poster);
1220 }
1217 #endif // defined(OS_ANDROID) // WMPI_CAST 1221 #endif // defined(OS_ANDROID) // WMPI_CAST
1218 1222
1219 void WebMediaPlayerImpl::DataSourceInitialized(bool success) { 1223 void WebMediaPlayerImpl::DataSourceInitialized(bool success) {
1220 DVLOG(1) << __FUNCTION__; 1224 DVLOG(1) << __FUNCTION__;
1221 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1225 DCHECK(main_task_runner_->BelongsToCurrentThread());
1222 1226
1223 if (!success) { 1227 if (!success) {
1224 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 1228 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
1225 1229
1226 // Not really necessary, since the pipeline was never started, but it at 1230 // Not really necessary, since the pipeline was never started, but it at
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1609 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1606 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1610 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1607 << ", Demuxer: " << demuxer_memory_usage; 1611 << ", Demuxer: " << demuxer_memory_usage;
1608 1612
1609 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1613 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1610 last_reported_memory_usage_ = current_memory_usage; 1614 last_reported_memory_usage_ = current_memory_usage;
1611 adjust_allocated_memory_cb_.Run(delta); 1615 adjust_allocated_memory_cb_.Run(delta);
1612 } 1616 }
1613 1617
1614 } // namespace media 1618 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698