Chromium Code Reviews| 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 HTMLVideoElement; | |
| 13 class MediaRemotingDisableButtonElement; | |
| 14 class MediaRemotingCastIconElement; | |
| 15 class MediaRemotingBackgroundImageElement; | |
| 16 class MediaRemotingInterstitialElements; | |
| 17 | |
| 18 // Media Remoting UI. DOM structure looks like: | |
| 19 // | |
| 20 // MediaRemotingInterstitial | |
| 21 // (-internal-media-remoting-interstitial) | |
| 22 // +-MediaRemotingBackgroundImageElement | |
| 23 // | (-internal-media-remoting-background-image) | |
| 24 // \-MediaRemotingInterstitialElements | |
| 25 // | (-internal-media-remoting-interstitial-elements) | |
| 26 // \-MediaRemotingCastIconElement | |
| 27 // | (-internal-media-remoting-cast-icon) | |
| 28 // \-MediaRemotingDisableButtonElement | |
| 29 // (-internal-media-remoting-disable-button) | |
| 30 class MediaRemotingInterstitial final : public HTMLDivElement { | |
| 31 public: | |
| 32 explicit MediaRemotingInterstitial(HTMLVideoElement&); | |
| 33 | |
| 34 // Show/Hide Media Remoting interstitial. | |
| 35 void show(); | |
| 36 void hide(); | |
| 37 bool shouldShow() { return m_shown; } | |
|
mlamouri (slow - plz ping)
2017/04/10 13:44:22
nit: `const`
xjz
2017/04/11 04:29:44
This function is removed now.
| |
| 38 void onPosterImageChanged(); | |
| 39 | |
| 40 HTMLVideoElement& videoElement() const { return *m_videoElement; } | |
| 41 | |
| 42 DECLARE_VIRTUAL_TRACE(); | |
| 43 | |
| 44 private: | |
| 45 // Node override. | |
| 46 bool isMediaRemotingInterstitial() const override { return true; } | |
| 47 | |
| 48 Member<HTMLVideoElement> m_videoElement; | |
| 49 Member<MediaRemotingInterstitialElements> m_interstitialElements; | |
| 50 Member<MediaRemotingBackgroundImageElement> m_mediaRemotingBackgroundImage; | |
| 51 | |
| 52 bool m_shown = false; | |
| 53 }; | |
| 54 | |
| 55 class MediaRemotingInterstitialElements final : public HTMLDivElement { | |
| 56 public: | |
| 57 explicit MediaRemotingInterstitialElements(MediaRemotingInterstitial&); | |
| 58 void onShown(); | |
| 59 void onHidden(); | |
| 60 HTMLVideoElement& videoElement() const; | |
| 61 | |
| 62 DECLARE_VIRTUAL_TRACE(); | |
| 63 | |
| 64 private: | |
| 65 Member<MediaRemotingInterstitial> m_interstitial; | |
| 66 Member<MediaRemotingDisableButtonElement> m_mediaRemotingDisableButton; | |
| 67 Member<MediaRemotingCastIconElement> m_MediaRemotingCastIcon; | |
| 68 }; | |
| 69 | |
| 70 } // namespace | |
| 71 | |
| 72 #endif // MediaRemotingInterstitial_h | |
| OLD | NEW |