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

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

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Addressed comments from PS#2. 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
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 observer_->OnEnteredFullscreen(); 354 observer_->OnEnteredFullscreen();
355 } 355 }
356 356
357 void WebMediaPlayerImpl::exitedFullscreen() { 357 void WebMediaPlayerImpl::exitedFullscreen() {
358 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) 358 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_)
359 DisableOverlay(); 359 DisableOverlay();
360 if (observer_) 360 if (observer_)
361 observer_->OnExitedFullscreen(); 361 observer_->OnExitedFullscreen();
362 } 362 }
363 363
364 void WebMediaPlayerImpl::stablyFilledMostViewport(
365 bool isMostlyFillingViewport) {
366 if (observer_)
367 observer_->OnStablyFilledMostViewportChanged(isMostlyFillingViewport);
368 }
369
364 void WebMediaPlayerImpl::DoLoad(LoadType load_type, 370 void WebMediaPlayerImpl::DoLoad(LoadType load_type,
365 const blink::WebURL& url, 371 const blink::WebURL& url,
366 CORSMode cors_mode) { 372 CORSMode cors_mode) {
367 DVLOG(1) << __func__; 373 DVLOG(1) << __func__;
368 DCHECK(main_task_runner_->BelongsToCurrentThread()); 374 DCHECK(main_task_runner_->BelongsToCurrentThread());
369 375
370 GURL gurl(url); 376 GURL gurl(url);
371 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); 377 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin());
372 378
373 // Set subresource URL for crash reporting. 379 // Set subresource URL for crash reporting.
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 pipeline_metadata_.natural_size, 1961 pipeline_metadata_.natural_size,
1956 base::Bind(&GetCurrentTimeInternal, this))); 1962 base::Bind(&GetCurrentTimeInternal, this)));
1957 watch_time_reporter_->OnVolumeChange(volume_); 1963 watch_time_reporter_->OnVolumeChange(volume_);
1958 if (delegate_ && delegate_->IsHidden()) 1964 if (delegate_ && delegate_->IsHidden())
1959 watch_time_reporter_->OnHidden(); 1965 watch_time_reporter_->OnHidden();
1960 else 1966 else
1961 watch_time_reporter_->OnShown(); 1967 watch_time_reporter_->OnShown();
1962 } 1968 }
1963 1969
1964 } // namespace media 1970 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698