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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: Created 3 years, 6 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/MediaControlsImpl.h
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
index c8bba03406999ebcf2a926da86f0cb5d7b5ef120..2163cc019e7fd3bf84a1e2e7018ec9c265d49e03 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
@@ -98,6 +98,8 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
// There is no update because only the overlay is expected to change.
RefreshCastButtonVisibilityWithoutUpdate();
}
+ bool GetDownloadButtonRect(IntRect&) override;
+ void IPHDisabled() override;
Document& OwnerDocument() { return GetDocument(); }
// Called by the fullscreen buttons to toggle fulllscreen on/off.
@@ -120,6 +122,8 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
void EndScrubbing();
void UpdateCurrentTimeDisplay();
+ void MaybeDispatchDownloadIPHTrigger();
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -257,6 +261,14 @@ class MODULES_EXPORT MediaControlsImpl final : public HTMLDivElement,
IntSize size_;
bool keep_showing_until_timer_fires_ : 1;
+
+ // Set to true when a IPH for the download button on the controls is being
+ // displayed.
+ bool iph_active_ = false;
+
+ // Set to true after the IPH trigger for an element has been observed. This
+ // ensures that the trigger for an element is observed only once.
+ bool iph_trigger_observed_ = false;
};
DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls());

Powered by Google App Engine
This is Rietveld 408576698