summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/media/html_video_element.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/media/html_video_element.h')
-rw-r--r--chromium/third_party/blink/renderer/core/html/media/html_video_element.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/media/html_video_element.h b/chromium/third_party/blink/renderer/core/html/media/html_video_element.h
index 3c1874cc9a8..5fb512df678 100644
--- a/chromium/third_party/blink/renderer/core/html/media/html_video_element.h
+++ b/chromium/third_party/blink/renderer/core/html/media/html_video_element.h
@@ -71,7 +71,6 @@ class CORE_EXPORT HTMLVideoElement final
IntSize videoVisibleSize() const;
- IntSize GetOverriddenIntrinsicSize() const;
bool IsDefaultIntrinsicSize() const {
return is_default_overridden_intrinsic_size_;
}
@@ -147,7 +146,7 @@ class CORE_EXPORT HTMLVideoElement final
gpu::gles2::GLES2Interface*,
GLenum target,
GLuint texture,
- bool already_uploaded_id,
+ int already_uploaded_id,
WebMediaPlayer::VideoFrameUploadMetadata* out_metadata);
bool ShouldDisplayPosterImage() const { return GetDisplayMode() == kPoster; }
@@ -162,7 +161,8 @@ class CORE_EXPORT HTMLVideoElement final
const FloatSize&) override;
bool IsVideoElement() const override { return true; }
bool WouldTaintOrigin() const override;
- FloatSize ElementSize(const FloatSize&) const override;
+ FloatSize ElementSize(const FloatSize&,
+ const RespectImageOrientationEnum) const override;
const KURL& SourceURL() const override { return currentSrc(); }
bool IsHTMLVideoElement() const override { return true; }
// Video elements currently always go through RAM when used as a canvas image
@@ -174,15 +174,12 @@ class CORE_EXPORT HTMLVideoElement final
ScriptPromise CreateImageBitmap(ScriptState*,
EventTarget&,
base::Optional<IntRect> crop_rect,
- const ImageBitmapOptions*) override;
+ const ImageBitmapOptions*,
+ ExceptionState&) override;
// WebMediaPlayerClient implementation.
void OnBecamePersistentVideo(bool) final;
- void ActivateViewportIntersectionMonitoring(bool) final;
- void OnRequestAnimationFrame(base::TimeTicks presentation_time,
- base::TimeTicks expected_presentation_time,
- uint32_t presented_frames_counter,
- const media::VideoFrame& presented_frame) final;
+ void OnRequestVideoFrameCallback() final;
bool IsPersistent() const;
@@ -193,6 +190,8 @@ class CORE_EXPORT HTMLVideoElement final
void MediaRemotingStopped(int error_code) final;
WebMediaPlayer::DisplayType DisplayType() const final;
bool IsInAutoPIP() const final;
+ void RequestEnterPictureInPicture() final;
+ void RequestExitPictureInPicture() final;
void OnPictureInPictureStateChange() final;
// Used by the PictureInPictureController as callback when the video element
@@ -201,6 +200,7 @@ class CORE_EXPORT HTMLVideoElement final
void OnExitedPictureInPicture();
void SetIsEffectivelyFullscreen(blink::WebFullscreenVideoStatus);
+ void SetIsDominantVisibleContent(bool is_dominant);
void SetImageForTest(ImageResourceContent* content) {
if (!image_loader_)
@@ -218,14 +218,16 @@ class CORE_EXPORT HTMLVideoElement final
void OnWebMediaPlayerCreated() final;
+ void AttributeChanged(const AttributeModificationParams& params) override;
+
private:
friend class MediaCustomControlsFullscreenDetectorTest;
friend class HTMLMediaElementEventListenersTest;
friend class HTMLVideoElementPersistentTest;
friend class VideoFillingViewportTest;
- // ContextLifecycleStateObserver functions.
- void ContextDestroyed(ExecutionContext*) final;
+ // ExecutionContextLifecycleStateObserver functions.
+ void ContextDestroyed() final;
bool LayoutObjectIsNeeded(const ComputedStyle&) const override;
LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override;
@@ -246,8 +248,8 @@ class CORE_EXPORT HTMLVideoElement final
void DidMoveToNewDocument(Document& old_document) override;
void SetDisplayMode(DisplayMode) override;
- void OnViewportIntersectionChanged(
- const HeapVector<Member<IntersectionObserverEntry>>& entries);
+ void UpdatePictureInPictureAvailability();
+
void OnIntersectionChangedForLazyLoad(
const HeapVector<Member<IntersectionObserverEntry>>& entries);
@@ -264,28 +266,26 @@ class CORE_EXPORT HTMLVideoElement final
// Represents whether the video is 'persistent'. It is used for videos with
// custom controls that are in auto-pip (Android). This boolean is used by a
// CSS rule.
- bool is_persistent_ = false;
+ bool is_persistent_ : 1;
// Whether the video is currently in auto-pip (Android). It is not similar to
// a video being in regular Picture-in-Picture mode.
- bool is_auto_picture_in_picture_ = false;
+ bool is_auto_picture_in_picture_ : 1;
// Whether this element is in overlay fullscreen mode.
- bool in_overlay_fullscreen_video_;
+ bool in_overlay_fullscreen_video_ : 1;
// Whether the video element should be considered as fullscreen with regards
// to display type and other UI features. This does not mean the DOM element
// is fullscreen.
- bool is_effectively_fullscreen_ = false;
+ bool is_effectively_fullscreen_ : 1;
- IntSize overridden_intrinsic_size_;
- bool is_default_overridden_intrinsic_size_;
+ bool is_default_overridden_intrinsic_size_ : 1;
- // The following is always false unless viewport intersection monitoring is
- // turned on via ActivateViewportIntersectionMonitoring().
- bool mostly_filling_viewport_ = false;
+ bool video_has_played_ : 1;
- Member<IntersectionObserver> viewport_intersection_observer_;
+ // True, if the video element occupies most of the viewport.
+ bool mostly_filling_viewport_ : 1;
};
} // namespace blink