| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 namespace gpu { | 36 namespace gpu { |
| 37 namespace gles2 { | 37 namespace gles2 { |
| 38 class GLES2Interface; | 38 class GLES2Interface; |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 class ExceptionState; | 43 class ExceptionState; |
| 44 class ImageBitmapOptions; | 44 class ImageBitmapOptions; |
| 45 class MediaCustomControlsFullscreenDetector; | 45 class MediaCustomControlsFullscreenDetector; |
| 46 class MediaRemotingInterstitial; |
| 46 | 47 |
| 47 class CORE_EXPORT HTMLVideoElement final : public HTMLMediaElement, | 48 class CORE_EXPORT HTMLVideoElement final : public HTMLMediaElement, |
| 48 public CanvasImageSource, | 49 public CanvasImageSource, |
| 49 public ImageBitmapSource { | 50 public ImageBitmapSource { |
| 50 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
| 51 | 52 |
| 52 public: | 53 public: |
| 53 static HTMLVideoElement* create(Document&); | 54 static HTMLVideoElement* create(Document&); |
| 54 DECLARE_VIRTUAL_TRACE(); | 55 DECLARE_VIRTUAL_TRACE(); |
| 55 | 56 |
| 57 enum MediaRemotingStatus { NotStarted, Started, Disabled }; |
| 58 |
| 56 // Node override. | 59 // Node override. |
| 57 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override; | 60 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 58 void removedFrom(ContainerNode*) override; | 61 void removedFrom(ContainerNode*) override; |
| 59 | 62 |
| 60 unsigned videoWidth() const; | 63 unsigned videoWidth() const; |
| 61 unsigned videoHeight() const; | 64 unsigned videoHeight() const; |
| 62 | 65 |
| 63 // Fullscreen | 66 // Fullscreen |
| 64 void webkitEnterFullscreen(); | 67 void webkitEnterFullscreen(); |
| 65 void webkitExitFullscreen(); | 68 void webkitExitFullscreen(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 EventTarget&, | 126 EventTarget&, |
| 124 Optional<IntRect> cropRect, | 127 Optional<IntRect> cropRect, |
| 125 const ImageBitmapOptions&, | 128 const ImageBitmapOptions&, |
| 126 ExceptionState&) override; | 129 ExceptionState&) override; |
| 127 | 130 |
| 128 // WebMediaPlayerClient implementation. | 131 // WebMediaPlayerClient implementation. |
| 129 void onBecamePersistentVideo(bool) final; | 132 void onBecamePersistentVideo(bool) final; |
| 130 | 133 |
| 131 bool isPersistent() const; | 134 bool isPersistent() const; |
| 132 | 135 |
| 136 MediaRemotingStatus mediaRemotingStatus() const { |
| 137 return m_mediaRemotingStatus; |
| 138 } |
| 139 void disableMediaRemoting(); |
| 140 |
| 133 private: | 141 private: |
| 134 friend class MediaCustomControlsFullscreenDetectorTest; | 142 friend class MediaCustomControlsFullscreenDetectorTest; |
| 135 friend class HTMLMediaElementEventListenersTest; | 143 friend class HTMLMediaElementEventListenersTest; |
| 136 friend class HTMLVideoElementPersistentTest; | 144 friend class HTMLVideoElementPersistentTest; |
| 137 | 145 |
| 138 HTMLVideoElement(Document&); | 146 HTMLVideoElement(Document&); |
| 139 | 147 |
| 140 // SuspendableObject functions. | 148 // SuspendableObject functions. |
| 141 void contextDestroyed(ExecutionContext*) final; | 149 void contextDestroyed(ExecutionContext*) final; |
| 142 | 150 |
| 143 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 151 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
| 144 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 152 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 145 void attachLayoutTree(const AttachContext& = AttachContext()) override; | 153 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 146 void parseAttribute(const AttributeModificationParams&) override; | 154 void parseAttribute(const AttributeModificationParams&) override; |
| 147 bool isPresentationAttribute(const QualifiedName&) const override; | 155 bool isPresentationAttribute(const QualifiedName&) const override; |
| 148 void collectStyleForPresentationAttribute(const QualifiedName&, | 156 void collectStyleForPresentationAttribute(const QualifiedName&, |
| 149 const AtomicString&, | 157 const AtomicString&, |
| 150 MutableStylePropertySet*) override; | 158 MutableStylePropertySet*) override; |
| 151 bool isURLAttribute(const Attribute&) const override; | 159 bool isURLAttribute(const Attribute&) const override; |
| 152 const AtomicString imageSourceURL() const override; | 160 const AtomicString imageSourceURL() const override; |
| 153 | 161 |
| 154 void updateDisplayState() override; | 162 void updateDisplayState() override; |
| 155 void didMoveToNewDocument(Document& oldDocument) override; | 163 void didMoveToNewDocument(Document& oldDocument) override; |
| 156 void setDisplayMode(DisplayMode) override; | 164 void setDisplayMode(DisplayMode) override; |
| 157 | 165 |
| 166 void mediaRemotingStarted() final; |
| 167 void mediaRemotingStopped() final; |
| 168 |
| 169 MediaRemotingStatus m_mediaRemotingStatus; |
| 170 |
| 158 Member<HTMLImageLoader> m_imageLoader; | 171 Member<HTMLImageLoader> m_imageLoader; |
| 159 Member<MediaCustomControlsFullscreenDetector> | 172 Member<MediaCustomControlsFullscreenDetector> |
| 160 m_customControlsFullscreenDetector; | 173 m_customControlsFullscreenDetector; |
| 174 Member<MediaRemotingInterstitial> m_remotingInterstitial; |
| 161 | 175 |
| 162 AtomicString m_defaultPosterURL; | 176 AtomicString m_defaultPosterURL; |
| 163 | 177 |
| 164 bool m_isPersistent = false; | 178 bool m_isPersistent = false; |
| 165 }; | 179 }; |
| 166 | 180 |
| 167 } // namespace blink | 181 } // namespace blink |
| 168 | 182 |
| 169 #endif // HTMLVideoElement_h | 183 #endif // HTMLVideoElement_h |
| OLD | NEW |