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

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: Add API to WebMediaPlayerClient. 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;
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 checkIntersectionWhenPausedTimerFired(TimerBase*);
404 void startPlaybackProgressTimer(); 406 void startPlaybackProgressTimer();
405 void startProgressEventTimer(); 407 void startProgressEventTimer();
408 void startCheckIntersectionWhenPausedTimer();
406 void stopPeriodicTimers(); 409 void stopPeriodicTimers();
407 410
408 void seek(double time); 411 void seek(double time);
409 void finishSeek(); 412 void finishSeek();
410 void checkIfSeekNeeded(); 413 void checkIfSeekNeeded();
411 void addPlayedRange(double start, double end); 414 void addPlayedRange(double start, double end);
412 415
413 // FIXME: Rename to scheduleNamedEvent for clarity. 416 // FIXME: Rename to scheduleNamedEvent for clarity.
414 void scheduleEvent(const AtomicString& eventName); 417 void scheduleEvent(const AtomicString& eventName);
415 418
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 void onVisibilityChangedForAutoplay(bool isVisible); 545 void onVisibilityChangedForAutoplay(bool isVisible);
543 546
544 void checkViewportIntersectionChanged(); 547 void checkViewportIntersectionChanged();
545 void viewportFillDebouncerTimerFired(TimerBase*); 548 void viewportFillDebouncerTimerFired(TimerBase*);
546 549
547 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer; 550 UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
548 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer; 551 UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
549 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer; 552 UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer;
550 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer; 553 UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer;
551 UnthrottledThreadTimer<HTMLMediaElement> m_viewportFillDebouncerTimer; 554 UnthrottledThreadTimer<HTMLMediaElement> m_viewportFillDebouncerTimer;
555 UnthrottledThreadTimer<HTMLMediaElement> m_checkIntersectionWhenPausedTimer;
552 Member<TimeRanges> m_playedTimeRanges; 556 Member<TimeRanges> m_playedTimeRanges;
553 Member<GenericEventQueue> m_asyncEventQueue; 557 Member<GenericEventQueue> m_asyncEventQueue;
554 558
555 double m_playbackRate; 559 double m_playbackRate;
556 double m_defaultPlaybackRate; 560 double m_defaultPlaybackRate;
557 NetworkState m_networkState; 561 NetworkState m_networkState;
558 ReadyState m_readyState; 562 ReadyState m_readyState;
559 ReadyState m_readyStateMaximum; 563 ReadyState m_readyStateMaximum;
560 KURL m_currentSrc; 564 KURL m_currentSrc;
561 Member<MediaStreamDescriptor> m_srcObject; 565 Member<MediaStreamDescriptor> m_srcObject;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 731
728 Member<AutoplayUmaHelper> m_autoplayUmaHelper; 732 Member<AutoplayUmaHelper> m_autoplayUmaHelper;
729 733
730 WebRemotePlaybackClient* m_remotePlaybackClient; 734 WebRemotePlaybackClient* m_remotePlaybackClient;
731 735
732 // class AutoplayVisibilityObserver; 736 // class AutoplayVisibilityObserver;
733 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver; 737 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver;
734 738
735 IntRect m_currentIntersectRect; 739 IntRect m_currentIntersectRect;
736 740
741 bool m_enableMonitorViewportIntersection = false;
742
737 static URLRegistry* s_mediaStreamRegistry; 743 static URLRegistry* s_mediaStreamRegistry;
738 }; 744 };
739 745
740 inline bool isHTMLMediaElement(const HTMLElement& element) { 746 inline bool isHTMLMediaElement(const HTMLElement& element) {
741 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 747 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
742 } 748 }
743 749
744 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 750 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
745 751
746 } // namespace blink 752 } // namespace blink
747 753
748 #endif // HTMLMediaElement_h 754 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698