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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 2556333002: Detect change on video/viewport intersection when rendered remotely (Closed)
Patch Set: Use single timer to check viewport intersection change. Update tests. 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 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void requestSeek(double) final; 390 void requestSeek(double) final;
391 void remoteRouteAvailabilityChanged(WebRemotePlaybackAvailability) final; 391 void remoteRouteAvailabilityChanged(WebRemotePlaybackAvailability) final;
392 void connectedToRemoteDevice() final; 392 void connectedToRemoteDevice() final;
393 void disconnectedFromRemoteDevice() final; 393 void disconnectedFromRemoteDevice() final;
394 void cancelledRemotePlaybackRequest() final; 394 void cancelledRemotePlaybackRequest() final;
395 void remotePlaybackStarted() final; 395 void remotePlaybackStarted() final;
396 bool hasSelectedVideoTrack() final; 396 bool hasSelectedVideoTrack() final;
397 WebMediaPlayer::TrackId getSelectedVideoTrackId() final; 397 WebMediaPlayer::TrackId getSelectedVideoTrackId() final;
398 bool isAutoplayingMuted() final; 398 bool isAutoplayingMuted() final;
399 void requestReload(const WebURL&) final; 399 void requestReload(const WebURL&) final;
400 void enableMonitorViewportIntersection(bool) final;
ojan 2016/12/14 00:39:08 I would have gone with a more generic name like "s
xjz 2016/12/14 00:55:05 Yes, currently this is only used to enable monitor
400 401
401 void loadTimerFired(TimerBase*); 402 void loadTimerFired(TimerBase*);
402 void progressEventTimerFired(TimerBase*); 403 void progressEventTimerFired(TimerBase*);
403 void playbackProgressTimerFired(TimerBase*); 404 void playbackProgressTimerFired(TimerBase*);
405 void checkViewportIntersectionTimerFired(TimerBase*);
404 void startPlaybackProgressTimer(); 406 void startPlaybackProgressTimer();
405 void startProgressEventTimer(); 407 void startProgressEventTimer();
406 void stopPeriodicTimers(); 408 void stopPeriodicTimers();
407 409
408 void seek(double time); 410 void seek(double time);
409 void finishSeek(); 411 void finishSeek();
410 void checkIfSeekNeeded(); 412 void checkIfSeekNeeded();
411 void addPlayedRange(double start, double end); 413 void addPlayedRange(double start, double end);
412 414
413 // FIXME: Rename to scheduleNamedEvent for clarity. 415 // FIXME: Rename to scheduleNamedEvent for clarity.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 void scheduleNotifyPlaying(); 536 void scheduleNotifyPlaying();
535 void resolveScheduledPlayPromises(); 537 void resolveScheduledPlayPromises();
536 void rejectScheduledPlayPromises(); 538 void rejectScheduledPlayPromises();
537 void rejectPlayPromises(ExceptionCode, const String&); 539 void rejectPlayPromises(ExceptionCode, const String&);
538 void rejectPlayPromisesInternal(ExceptionCode, const String&); 540 void rejectPlayPromisesInternal(ExceptionCode, const String&);
539 541
540 EnumerationHistogram& showControlsHistogram() const; 542 EnumerationHistogram& showControlsHistogram() const;
541 543
542 void onVisibilityChangedForAutoplay(bool isVisible); 544 void onVisibilityChangedForAutoplay(bool isVisible);
543 545
544 void checkViewportIntersectionChanged();
545 void viewportFillDebouncerTimerFired(TimerBase*); 546 void viewportFillDebouncerTimerFired(TimerBase*);
546 547
547 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer; 548 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
548 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer; 549 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
549 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer; 550 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer;
550 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer; 551 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer;
551 UnthrottledThreadTimer<HTMLMediaElement> m_viewportFillDebouncerTimer; 552 UnthrottledThreadTimer<HTMLMediaElement> m_viewportFillDebouncerTimer;
553 UnthrottledThreadTimer<HTMLMediaElement> m_checkViewportIntersectionTimer;
552 Member<TimeRanges> m_playedTimeRanges; 554 Member<TimeRanges> m_playedTimeRanges;
553 Member<GenericEventQueue> m_asyncEventQueue; 555 Member<GenericEventQueue> m_asyncEventQueue;
554 556
555 double m_playbackRate; 557 double m_playbackRate;
556 double m_defaultPlaybackRate; 558 double m_defaultPlaybackRate;
557 NetworkState m_networkState; 559 NetworkState m_networkState;
558 ReadyState m_readyState; 560 ReadyState m_readyState;
559 ReadyState m_readyStateMaximum; 561 ReadyState m_readyStateMaximum;
560 KURL m_currentSrc; 562 KURL m_currentSrc;
561 Member<MediaStreamDescriptor> m_srcObject; 563 Member<MediaStreamDescriptor> m_srcObject;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 741
740 inline bool isHTMLMediaElement(const HTMLElement& element) { 742 inline bool isHTMLMediaElement(const HTMLElement& element) {
741 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 743 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
742 } 744 }
743 745
744 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 746 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
745 747
746 } // namespace blink 748 } // namespace blink
747 749
748 #endif // HTMLMediaElement_h 750 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698