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

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

Issue 2334803002: Implementation of media controls download button. (Closed)
Patch Set: fixed tests 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 c7e4633692f97df38f610d0c79a190c250552633..55521019fb083cff3e29598029db70a9c6e835ec 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
@@ -219,18 +219,25 @@ private:
// downloadable.
class MediaControlDownloadButtonElement final : public MediaControlInputElement {
public:
- static MediaControlDownloadButtonElement* create(MediaControls&, Document*);
+ static MediaControlDownloadButtonElement* create(MediaControls&);
WebLocalizedString::Name getOverflowStringName() override;
+ bool hasOverflowButton() override { return true; }
+
// 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();
+ DECLARE_VIRTUAL_TRACE();
+
private:
explicit MediaControlDownloadButtonElement(MediaControls&);
void defaultEventHandler(Event*) override;
+
+ // Points to an anchor element that contains the URL of the media file.
+ Member<HTMLAnchorElement> m_anchor;
};
class MediaControlTimelineElement final : public MediaControlInputElement {

Powered by Google App Engine
This is Rietveld 408576698