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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Created 3 years, 9 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.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3424675381d5f446bf5ed94f69a7f3bed9e6681b
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/shadow/MediaRemotingInterstitial.cpp
@@ -0,0 +1,34 @@
+// 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.
+
+#include "core/html/shadow/MediaRemotingInterstitial.h"
+
+#include "core/html/HTMLMediaElement.h"
+#include "core/html/shadow/MediaControlElements.h"
+
+namespace blink {
+
+MediaRemotingInterstitial::MediaRemotingInterstitial(
+ HTMLMediaElement& mediaElement)
+ : HTMLDivElement(mediaElement.document()), m_mediaElement(&mediaElement) {
+ setShadowPseudoId(AtomicString("-webkit-media-remoting-interstitial"));
+ m_mediaRemotingDisableButton = new MediaRemotingDisableButtonElement(*this);
+ appendChild(m_mediaRemotingDisableButton);
+}
+
+void MediaRemotingInterstitial::show() {
+ m_mediaRemotingDisableButton->show();
+}
+
+void MediaRemotingInterstitial::hide() {
+ m_mediaRemotingDisableButton->hide();
+}
+
+DEFINE_TRACE(MediaRemotingInterstitial) {
+ visitor->trace(m_mediaElement);
+ visitor->trace(m_mediaRemotingDisableButton);
+ HTMLDivElement::trace(visitor);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698