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

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

Issue 1952133003: WebMediaPlayerImpl now uses OverlayFullscreenVideo mode on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 DVLOG(1) << __FUNCTION__ << "(" << load_type << ", " << url << ", " 278 DVLOG(1) << __FUNCTION__ << "(" << load_type << ", " << url << ", "
279 << cors_mode << ")"; 279 << cors_mode << ")";
280 if (!defer_load_cb_.is_null()) { 280 if (!defer_load_cb_.is_null()) {
281 defer_load_cb_.Run(base::Bind( 281 defer_load_cb_.Run(base::Bind(
282 &WebMediaPlayerImpl::DoLoad, AsWeakPtr(), load_type, url, cors_mode)); 282 &WebMediaPlayerImpl::DoLoad, AsWeakPtr(), load_type, url, cors_mode));
283 return; 283 return;
284 } 284 }
285 DoLoad(load_type, url, cors_mode); 285 DoLoad(load_type, url, cors_mode);
286 } 286 }
287 287
288 bool WebMediaPlayerImpl::supportsOverlayFullscreenVideo() {
289 #if defined(OS_ANDROID)
290 return true;
291 #else
292 return false;
293 #endif
294 }
295
288 void WebMediaPlayerImpl::enteredFullscreen() { 296 void WebMediaPlayerImpl::enteredFullscreen() {
289 fullscreen_ = true; 297 fullscreen_ = true;
290 if (decoder_requires_restart_for_fullscreen_) 298 if (decoder_requires_restart_for_fullscreen_)
291 ScheduleRestart(); 299 ScheduleRestart();
292 } 300 }
293 301
294 void WebMediaPlayerImpl::exitedFullscreen() { 302 void WebMediaPlayerImpl::exitedFullscreen() {
295 fullscreen_ = false; 303 fullscreen_ = false;
296 if (decoder_requires_restart_for_fullscreen_) 304 if (decoder_requires_restart_for_fullscreen_)
297 ScheduleRestart(); 305 ScheduleRestart();
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1604 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1597 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1605 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1598 << ", Demuxer: " << demuxer_memory_usage; 1606 << ", Demuxer: " << demuxer_memory_usage;
1599 1607
1600 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1608 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1601 last_reported_memory_usage_ = current_memory_usage; 1609 last_reported_memory_usage_ = current_memory_usage;
1602 adjust_allocated_memory_cb_.Run(delta); 1610 adjust_allocated_memory_cb_.Run(delta);
1603 } 1611 }
1604 1612
1605 } // namespace media 1613 } // 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