VideoPaintable.h 766 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Forward.h>
  8. #include <LibWeb/Painting/MediaPaintable.h>
  9. namespace Web::Painting {
  10. class VideoPaintable final : public MediaPaintable {
  11. JS_CELL(VideoPaintable, MediaPaintable);
  12. public:
  13. static JS::NonnullGCPtr<VideoPaintable> create(Layout::VideoBox const&);
  14. virtual void paint(PaintContext&, PaintPhase) const override;
  15. Layout::VideoBox& layout_box();
  16. Layout::VideoBox const& layout_box() const;
  17. private:
  18. VideoPaintable(Layout::VideoBox const&);
  19. void paint_placeholder_video_controls(PaintContext&, DevicePixelRect video_rect, Optional<DevicePixelPoint> const& mouse_position) const;
  20. };
  21. }