Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Modified disable button. Added cast icon and message. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 HTMLMediaElement;
13 class MediaRemotingDisableButtonElement;
14 class MediaRemotingCastIconElement;
15 class MediaRemotingCastMessageElement;
16 class MediaRemotingBackgroundImageElement;
17 class MediaRemotingInterstitialElements;
18
19 // Media Remoting UI. DOM structure looks like:
20 //
21 // MediaRemotingInterstitial
22 // (-internal-media-remoting-interstitial)
23 // +-MediaRemotingBackgroundImageElement
24 // | (-internal-media-remoting-background-image)
25 // \-MediaRemotingInterstitialElements
26 // | (-internal-media-remoting-interstitial-elements)
27 // \-MediaRemotingCastIconElement
28 // | (-internal-media-remoting-disable-button)
29 // +-MediaRemotingCastMessageElement
30 // | (-internal-media-remoting-cast-text)
31 // \-MediaRemotingDisableButtonElement
32 // (-internal-media-controls-cast-button)
33 class MediaRemotingInterstitial final : public HTMLDivElement {
34 public:
35 explicit MediaRemotingInterstitial(HTMLMediaElement&);
36
37 // Show/Hide Media Remoting interstitial.
38 void show();
39 void hide();
40 bool shouldShow() { return m_shown; }
41 void onPosterImageChanged();
42
43 HTMLMediaElement& mediaElement() const { return *m_mediaElement; }
44
45 DECLARE_VIRTUAL_TRACE();
46
47 private:
48 // Node override.
49 bool isMediaControls() const override { return true; }
50
51 Member<HTMLMediaElement> m_mediaElement;
52 Member<MediaRemotingInterstitialElements> m_interstitialElements;
53 Member<MediaRemotingBackgroundImageElement> m_mediaRemotingBackgroundImage;
54
55 bool m_shown = false;
56 };
57
58 class MediaRemotingInterstitialElements final : public HTMLDivElement {
59 public:
60 explicit MediaRemotingInterstitialElements(MediaRemotingInterstitial&);
61 void show();
62 void hide();
63 HTMLMediaElement& mediaElement() const;
64
65 DECLARE_VIRTUAL_TRACE();
66
67 private:
68 Member<MediaRemotingInterstitial> m_interstitial;
69 Member<MediaRemotingDisableButtonElement> m_mediaRemotingDisableButton;
70 Member<MediaRemotingCastIconElement> m_MediaRemotingCastIcon;
71 Member<MediaRemotingCastMessageElement> m_mediaRemotingCastMessage;
72 };
73
74 } // namespace
75
76 #endif // MediaRemotingInterstitial_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698