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

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

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Rebase again. Created 4 years 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') | media/remoting/remoting_renderer_controller.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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 observer_->OnEnteredFullscreen(); 358 observer_->OnEnteredFullscreen();
359 } 359 }
360 360
361 void WebMediaPlayerImpl::exitedFullscreen() { 361 void WebMediaPlayerImpl::exitedFullscreen() {
362 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) 362 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_)
363 DisableOverlay(); 363 DisableOverlay();
364 if (observer_) 364 if (observer_)
365 observer_->OnExitedFullscreen(); 365 observer_->OnExitedFullscreen();
366 } 366 }
367 367
368 void WebMediaPlayerImpl::becameDominantVisibleContent(bool isDominant) {
369 if (observer_)
370 observer_->OnBecameDominantVisibleContent(isDominant);
371 }
372
368 void WebMediaPlayerImpl::DoLoad(LoadType load_type, 373 void WebMediaPlayerImpl::DoLoad(LoadType load_type,
369 const blink::WebURL& url, 374 const blink::WebURL& url,
370 CORSMode cors_mode) { 375 CORSMode cors_mode) {
371 DVLOG(1) << __func__; 376 DVLOG(1) << __func__;
372 DCHECK(main_task_runner_->BelongsToCurrentThread()); 377 DCHECK(main_task_runner_->BelongsToCurrentThread());
373 378
374 GURL gurl(url); 379 GURL gurl(url);
375 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); 380 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin());
376 381
377 // Set subresource URL for crash reporting. 382 // Set subresource URL for crash reporting.
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 watch_time_reporter_->OnShown(); 1986 watch_time_reporter_->OnShown();
1982 } 1987 }
1983 1988
1984 bool WebMediaPlayerImpl::IsHidden() const { 1989 bool WebMediaPlayerImpl::IsHidden() const {
1985 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1990 DCHECK(main_task_runner_->BelongsToCurrentThread());
1986 1991
1987 return delegate_ && delegate_->IsHidden(); 1992 return delegate_ && delegate_->IsHidden();
1988 } 1993 }
1989 1994
1990 } // namespace media 1995 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/remoting/remoting_renderer_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698