Index: third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp |
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp |
index f7a9f8f05c581e16d097cdb60ff5599fbb36acc9..221f127733d9d431eb4339bdf47be9518201bb2e 100644 |
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp |
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp |
@@ -13,6 +13,7 @@ |
#include "core/html/media/HTMLMediaSource.h" |
#include "core/page/Page.h" |
#include "modules/media_controls/MediaControlsImpl.h" |
+#include "modules/media_controls/MediaDownloadInProductHelpManager.h" |
#include "public/platform/Platform.h" |
namespace blink { |
@@ -93,6 +94,15 @@ const char* MediaControlDownloadButtonElement::GetNameForHistograms() const { |
return IsOverflowElement() ? "DownloadOverflowButton" : "DownloadButton"; |
} |
+void MediaControlDownloadButtonElement::UpdateShownState() { |
+ MediaControlInputElement::UpdateShownState(); |
+ |
+ if (GetMediaControls().DownloadInProductHelp()) { |
+ GetMediaControls().DownloadInProductHelp()->SetDownloadButtonVisibility( |
+ IsWanted() && DoesFit()); |
+ } |
+} |
+ |
void MediaControlDownloadButtonElement::DefaultEventHandler(Event* event) { |
const KURL& url = MediaElement().currentSrc(); |
if (event->type() == EventTypeNames::click && |