OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MediaRemotingInterstitial_h |
| 6 #define MediaRemotingInterstitial_h |
| 7 |
| 8 #include "core/html/HTMLDivElement.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class HTMLImageElement; |
| 13 class HTMLVideoElement; |
| 14 class MediaRemotingDisableButtonElement; |
| 15 class MediaRemotingInterstitialElements; |
| 16 |
| 17 // Media Remoting UI. DOM structure looks like: |
| 18 // |
| 19 // MediaRemotingInterstitial |
| 20 // (-internal-media-remoting-interstitial) |
| 21 // +-HTMLImageElement |
| 22 // | (-internal-media-remoting-background-image) |
| 23 // \-MediaRemotingInterstitialElements |
| 24 // | (-internal-media-remoting-interstitial-elements) |
| 25 // \-HTMLInputElement |
| 26 // | (-internal-media-remoting-cast-icon) |
| 27 // \-MediaRemotingDisableButtonElement |
| 28 // (-internal-media-remoting-disable-button) |
| 29 class MediaRemotingInterstitial final : public HTMLDivElement { |
| 30 public: |
| 31 explicit MediaRemotingInterstitial(HTMLVideoElement&); |
| 32 |
| 33 // Show/Hide Media Remoting interstitial. |
| 34 void Show(); |
| 35 void Hide(); |
| 36 void OnPosterImageChanged(); |
| 37 |
| 38 HTMLVideoElement& VideoElement() const { return *video_element_; } |
| 39 |
| 40 DECLARE_VIRTUAL_TRACE(); |
| 41 |
| 42 private: |
| 43 // Node override. |
| 44 bool IsMediaRemotingInterstitial() const override { return true; } |
| 45 |
| 46 Member<HTMLVideoElement> video_element_; |
| 47 Member<MediaRemotingInterstitialElements> interstitial_elements_; |
| 48 Member<HTMLImageElement> background_image_; |
| 49 }; |
| 50 |
| 51 class MediaRemotingInterstitialElements final : public HTMLDivElement { |
| 52 public: |
| 53 explicit MediaRemotingInterstitialElements(MediaRemotingInterstitial&); |
| 54 void OnShown(); |
| 55 void OnHidden(); |
| 56 HTMLVideoElement& VideoElement() const; |
| 57 |
| 58 DECLARE_VIRTUAL_TRACE(); |
| 59 |
| 60 private: |
| 61 Member<MediaRemotingInterstitial> interstitial_; |
| 62 Member<MediaRemotingDisableButtonElement> disable_button_; |
| 63 Member<HTMLInputElement> cast_icon_; |
| 64 Member<HTMLInputElement> cast_text_message_; |
| 65 }; |
| 66 |
| 67 } // namespace |
| 68 |
| 69 #endif // MediaRemotingInterstitial_h |
OLD | NEW |