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

Unified 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: Addressed mlamouri's comments. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h
new file mode 100644
index 0000000000000000000000000000000000000000..9747bf1b91bd9c8df067951ff67cbeada2e1237b
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.h
@@ -0,0 +1,72 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MediaRemotingInterstitial_h
+#define MediaRemotingInterstitial_h
+
+#include "core/html/HTMLDivElement.h"
+
+namespace blink {
+
+class HTMLVideoElement;
+class MediaRemotingDisableButtonElement;
+class MediaRemotingCastIconElement;
+class MediaRemotingBackgroundImageElement;
+class MediaRemotingInterstitialElements;
+
+// Media Remoting UI. DOM structure looks like:
+//
+// MediaRemotingInterstitial
+// (-internal-media-remoting-interstitial)
+// +-MediaRemotingBackgroundImageElement
+// | (-internal-media-remoting-background-image)
+// \-MediaRemotingInterstitialElements
+// | (-internal-media-remoting-interstitial-elements)
+// \-MediaRemotingCastIconElement
+// | (-internal-media-remoting-cast-icon)
+// \-MediaRemotingDisableButtonElement
+// (-internal-media-remoting-disable-button)
+class MediaRemotingInterstitial final : public HTMLDivElement {
+ public:
+ explicit MediaRemotingInterstitial(HTMLVideoElement&);
+
+ // Show/Hide Media Remoting interstitial.
+ void show();
+ void hide();
+ 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.
+ void onPosterImageChanged();
+
+ HTMLVideoElement& videoElement() const { return *m_videoElement; }
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ // Node override.
+ bool isMediaRemotingInterstitial() const override { return true; }
+
+ Member<HTMLVideoElement> m_videoElement;
+ Member<MediaRemotingInterstitialElements> m_interstitialElements;
+ Member<MediaRemotingBackgroundImageElement> m_mediaRemotingBackgroundImage;
+
+ bool m_shown = false;
+};
+
+class MediaRemotingInterstitialElements final : public HTMLDivElement {
+ public:
+ explicit MediaRemotingInterstitialElements(MediaRemotingInterstitial&);
+ void onShown();
+ void onHidden();
+ HTMLVideoElement& videoElement() const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ Member<MediaRemotingInterstitial> m_interstitial;
+ Member<MediaRemotingDisableButtonElement> m_mediaRemotingDisableButton;
+ Member<MediaRemotingCastIconElement> m_MediaRemotingCastIcon;
+};
+
+} // namespace
+
+#endif // MediaRemotingInterstitial_h

Powered by Google App Engine
This is Rietveld 408576698