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

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

Issue 2411553003: Notify WebMediaPlayer when its ancestor enters/exists fullscreen. (Closed)
Patch Set: Rebased. Add FullscreenObserver. Created 4 years, 2 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') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('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 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 observer_->OnEnteredFullscreen(); 344 observer_->OnEnteredFullscreen();
345 } 345 }
346 346
347 void WebMediaPlayerImpl::exitedFullscreen() { 347 void WebMediaPlayerImpl::exitedFullscreen() {
348 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) 348 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_)
349 DisableOverlay(); 349 DisableOverlay();
350 if (observer_) 350 if (observer_)
351 observer_->OnExitedFullscreen(); 351 observer_->OnExitedFullscreen();
352 } 352 }
353 353
354 void WebMediaPlayerImpl::enteredFullWindow() {
355 if (observer_)
356 observer_->OnEnteredFullscreen();
357 }
358
359 void WebMediaPlayerImpl::exitedFullWindow() {
360 if (observer_)
361 observer_->OnExitedFullscreen();
362 }
363
354 void WebMediaPlayerImpl::DoLoad(LoadType load_type, 364 void WebMediaPlayerImpl::DoLoad(LoadType load_type,
355 const blink::WebURL& url, 365 const blink::WebURL& url,
356 CORSMode cors_mode) { 366 CORSMode cors_mode) {
357 DVLOG(1) << __func__; 367 DVLOG(1) << __func__;
358 DCHECK(main_task_runner_->BelongsToCurrentThread()); 368 DCHECK(main_task_runner_->BelongsToCurrentThread());
359 369
360 GURL gurl(url); 370 GURL gurl(url);
361 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); 371 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin());
362 372
363 // Set subresource URL for crash reporting. 373 // Set subresource URL for crash reporting.
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 pipeline_metadata_.natural_size, 1894 pipeline_metadata_.natural_size,
1885 base::Bind(&GetCurrentTimeInternal, this))); 1895 base::Bind(&GetCurrentTimeInternal, this)));
1886 watch_time_reporter_->OnVolumeChange(volume_); 1896 watch_time_reporter_->OnVolumeChange(volume_);
1887 if (delegate_ && delegate_->IsHidden()) 1897 if (delegate_ && delegate_->IsHidden())
1888 watch_time_reporter_->OnHidden(); 1898 watch_time_reporter_->OnHidden();
1889 else 1899 else
1890 watch_time_reporter_->OnShown(); 1900 watch_time_reporter_->OnShown();
1891 } 1901 }
1892 1902
1893 } // namespace media 1903 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698