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

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

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: not on pause. 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.h
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h
index da1f7e08f9f7f6a3100155d5584ace7ce67f5ca9..907849269a90766990f61abbe97d163b56140da4 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h
@@ -6,6 +6,7 @@
#define MediaControlDownloadButtonElement_h
#include "core/html/shadow/MediaControlElementTypes.h"
+#include "public/platform/media_in_product_help.mojom-blink.h"
namespace blink {
@@ -21,6 +22,10 @@ class MediaControlDownloadButtonElement final
// show the button for only non-MSE, non-EME, and non-MediaStream content.
bool ShouldDisplayDownloadButton();
+ void UpdateInProductHelpState();
+ void MaybeDispatchInProductHelpTrigger();
+ bool IsShowingInProductHelp() const;
+
// MediaControlInputElement overrides.
// TODO(mlamouri): add WillRespondToMouseClickEvents
WebLocalizedString::Name GetOverflowStringName() override;
@@ -41,6 +46,7 @@ class MediaControlDownloadButtonElement final
void DefaultEventHandler(Event*) override;
void RecordMetrics(DownloadActionMetrics);
+ void DismissDownloadInProductHelp();
// Points to an anchor element that contains the URL of the media file.
Member<HTMLAnchorElement> anchor_;
@@ -49,6 +55,9 @@ class MediaControlDownloadButtonElement final
// for the same media element.
bool click_use_counted_ = false;
bool show_use_counted_ = false;
+
+ std::unique_ptr<mojom::blink::MediaInProductHelpPtr> media_in_product_help_;
+ bool media_download_in_product_trigger_observed_ = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698