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

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

Issue 2293273002: Add a download button to the media player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-controls
Patch Set: Created 4 years, 3 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/MediaControlElements.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
index f0652ad7b8717209912723009fe7b11782ad1d54..c7e4633692f97df38f610d0c79a190c250552633 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
@@ -215,6 +215,23 @@ private:
};
// ----------------------------
+// Represents a button that allows users to download media if the file is
+// downloadable.
+class MediaControlDownloadButtonElement final : public MediaControlInputElement {
+public:
+ static MediaControlDownloadButtonElement* create(MediaControls&, Document*);
+
+ WebLocalizedString::Name getOverflowStringName() override;
+
+ // Returns true if the download button should be shown. We should
+ // show the button for only non-MSE, non-EME, and non-MediaStream content.
+ bool shouldDisplayDownloadButton();
+
+private:
+ explicit MediaControlDownloadButtonElement(MediaControls&);
+
+ void defaultEventHandler(Event*) override;
+};
class MediaControlTimelineElement final : public MediaControlInputElement {
public:

Powered by Google App Engine
This is Rietveld 408576698