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

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: mounir's comments. 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 ca65918220c86784d8162af10f67bb5d941f496c..8e49c3bddda86e1bcf3c443b565ee0de43be2e84 100644
--- a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlDownloadButtonElement.h
@@ -5,14 +5,17 @@
#ifndef MediaControlDownloadButtonElement_h
#define MediaControlDownloadButtonElement_h
+#include "modules/ModulesExport.h"
#include "modules/media_controls/elements/MediaControlInputElement.h"
+#include "public/platform/media_download_in_product_help.mojom-blink.h"
+
namespace blink {
class Event;
class MediaControlsImpl;
-class MediaControlDownloadButtonElement final
+class MODULES_EXPORT MediaControlDownloadButtonElement final
: public MediaControlInputElement {
public:
explicit MediaControlDownloadButtonElement(MediaControlsImpl&);
@@ -21,6 +24,10 @@ class MediaControlDownloadButtonElement final
// show the button for only non-MSE, non-EME, and non-MediaStream content.
bool ShouldDisplayDownloadButton();
+ void DismissInProductHelp();
+ void MaybeDispatchInProductHelpTrigger();
+ bool IsShowingInProductHelp() const;
+
// MediaControlInputElement overrides.
// TODO(mlamouri): add WillRespondToMouseClickEvents
WebLocalizedString::Name GetOverflowStringName() const override;
@@ -49,6 +56,10 @@ class MediaControlDownloadButtonElement final
// for the same media element.
bool click_use_counted_ = false;
bool show_use_counted_ = false;
+
+ std::unique_ptr<mojom::blink::MediaDownloadInProductHelpPtr>
+ media_in_product_help_;
+ bool media_download_in_product_trigger_observed_ = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698