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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.h

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Rebased. 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/MediaRemotingElements.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.h b/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.h
new file mode 100644
index 0000000000000000000000000000000000000000..605678e2b91146c9f3cf5ad7e759e570b4d9c853
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.h
@@ -0,0 +1,49 @@
+// 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 MediaRemotingElements_h
+#define MediaRemotingElements_h
+
+#include "core/html/shadow/MediaRemotingInterstitial.h"
+
+namespace blink {
+
+// A button shown when media remoting starts. It allows user to click to exit
+// media remoting and back to traditional tab mirroring.
+class MediaRemotingExitButtonElement final : public HTMLDivElement {
+ public:
+ explicit MediaRemotingExitButtonElement(MediaRemotingInterstitial&);
+
+ void OnShown();
+ void OnHidden();
+ HTMLVideoElement& GetVideoElement() const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ class MouseEventsListener;
+
+ Member<MediaRemotingInterstitial> interstitial_;
+ // A document event listener to listen to the mouse clicking events while
+ // media remoting is ongoing. This listener is used instead of the
+ // DefaultEventHandler() to avoid other web sites stopping propagating the
+ // events. It will be removed once media remoting stops.
+ Member<MouseEventsListener> listener_;
+};
+
+// A text message shown to indicate media remoting is ongoing.
+class MediaRemotingCastMessageElement final : public HTMLDivElement {
+ public:
+ explicit MediaRemotingCastMessageElement(MediaRemotingInterstitial&);
+};
+
+// An icon shown to indicate media remoting is ongoing.
+class MediaRemotingCastIconElement final : public HTMLDivElement {
+ public:
+ explicit MediaRemotingCastIconElement(MediaRemotingInterstitial&);
+};
+
+} // namespace blink
+
+#endif // MediaRemotingElements_h

Powered by Google App Engine
This is Rietveld 408576698