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

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

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Created 4 years, 1 month 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 void notifyPositionMayHaveChanged(const IntRect&); 305 void notifyPositionMayHaveChanged(const IntRect&);
306 void updatePositionNotificationRegistration(); 306 void updatePositionNotificationRegistration();
307 307
308 WebRemotePlaybackClient* remotePlaybackClient() { 308 WebRemotePlaybackClient* remotePlaybackClient() {
309 return m_remotePlaybackClient; 309 return m_remotePlaybackClient;
310 } 310 }
311 const WebRemotePlaybackClient* remotePlaybackClient() const { 311 const WebRemotePlaybackClient* remotePlaybackClient() const {
312 return m_remotePlaybackClient; 312 return m_remotePlaybackClient;
313 } 313 }
314 314
315 WebMediaPlayer::ViewportIntersectionInfo currentViewportIntersection() const {
316 return m_currentViewportIntersection;
317 }
318
315 protected: 319 protected:
316 HTMLMediaElement(const QualifiedName&, Document&); 320 HTMLMediaElement(const QualifiedName&, Document&);
317 ~HTMLMediaElement() override; 321 ~HTMLMediaElement() override;
318 void dispose(); 322 void dispose();
319 323
320 void parseAttribute(const QualifiedName&, 324 void parseAttribute(const QualifiedName&,
321 const AtomicString&, 325 const AtomicString&,
322 const AtomicString&) override; 326 const AtomicString&) override;
323 void finishParsingChildren() final; 327 void finishParsingChildren() final;
324 bool isURLAttribute(const Attribute&) const override; 328 bool isURLAttribute(const Attribute&) const override;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 728
725 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient; 729 Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient;
726 Member<AutoplayExperimentHelper> m_autoplayHelper; 730 Member<AutoplayExperimentHelper> m_autoplayHelper;
727 Member<AutoplayUmaHelper> m_autoplayUmaHelper; 731 Member<AutoplayUmaHelper> m_autoplayUmaHelper;
728 732
729 WebRemotePlaybackClient* m_remotePlaybackClient; 733 WebRemotePlaybackClient* m_remotePlaybackClient;
730 734
731 // class AutoplayVisibilityObserver; 735 // class AutoplayVisibilityObserver;
732 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver; 736 Member<ElementVisibilityObserver> m_autoplayVisibilityObserver;
733 737
738 WebMediaPlayer::ViewportIntersectionInfo m_currentViewportIntersection;
739
734 static URLRegistry* s_mediaStreamRegistry; 740 static URLRegistry* s_mediaStreamRegistry;
735 }; 741 };
736 742
737 inline bool isHTMLMediaElement(const HTMLElement& element) { 743 inline bool isHTMLMediaElement(const HTMLElement& element) {
738 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 744 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
739 } 745 }
740 746
741 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 747 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
742 748
743 } // namespace blink 749 } // namespace blink
744 750
745 #endif // HTMLMediaElement_h 751 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698