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

Unified Diff: third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: tests Created 3 years, 5 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/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 2007c5d81496f008d9a3228e482bb144f32c404f..0dc3080397913380145c904d25edbe6f0bf4029f 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.cpp
@@ -91,11 +91,14 @@ void MediaControlDownloadButtonElement::SetIsWanted(bool wanted) {
if (!IsWanted())
return;
- DCHECK(IsWanted());
if (!show_use_counted_) {
show_use_counted_ = true;
RecordMetrics(DownloadActionMetrics::kShown);
}
+
+ // If the button is wanted, show IPH if possible.
+ static_cast<MediaControlsImpl&>(GetMediaControls())
+ .MaybeDispatchDownloadIPHTrigger();
}
DEFINE_TRACE(MediaControlDownloadButtonElement) {

Powered by Google App Engine
This is Rietveld 408576698