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

Unified Diff: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp

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/paint/MediaControlsPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp
index 93047acb97337bea5d83f4b494e2305f482d15bb..0d5a2fcdb0160c3e84a4682e4eefd196bb8c94ee 100644
--- a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp
@@ -614,6 +614,16 @@ bool MediaControlsPainter::paintMediaOverflowMenu(const LayoutObject& object, co
return paintMediaButton(paintInfo.context, rect, mediaOverflowButton);
}
+bool MediaControlsPainter::paintMediaDownloadIcon(const LayoutObject& object, const PaintInfo& paintInfo, const IntRect& rect)
+{
+ const HTMLMediaElement* mediaElement = toParentMediaElement(object);
+ if (!mediaElement)
+ return false;
+
+ static Image* mediaDownloadIcon = platformResource("mediaplayerDownloadIcon");
+ return paintMediaButton(paintInfo.context, rect, mediaDownloadIcon);
+}
+
void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style)
{
static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb",
« no previous file with comments | « third_party/WebKit/Source/core/paint/MediaControlsPainter.h ('k') | third_party/WebKit/Source/core/paint/ThemePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698