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

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

Issue 2898543002: media_controls: Add UI for showing a promo bubble on a control button. (Closed)
Patch Set: make animation work 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MediaControlDownloadButtonElement_h 5 #ifndef MediaControlDownloadButtonElement_h
6 #define MediaControlDownloadButtonElement_h 6 #define MediaControlDownloadButtonElement_h
7 7
8 #include "core/html/shadow/MediaControlElementTypes.h" 8 #include "core/html/shadow/MediaControlElementTypes.h"
9 #include "modules/media_controls/MediaControlsImpl.h"
10 #include "modules/media_controls/elements/MediaControlElementsHelper.h"
9 11
10 namespace blink { 12 namespace blink {
11 13
12 class Event; 14 class Event;
13 class MediaControlsImpl; 15 class MediaControlsImpl;
14 16
17 class MediaControlDownloadButtonContainer final
18 : public MediaControlDivElement {
19 public:
20 explicit MediaControlDownloadButtonContainer(MediaControlsImpl&);
21 bool KeepEventInNode(Event*) override;
22 };
23
15 class MediaControlDownloadButtonElement final 24 class MediaControlDownloadButtonElement final
16 : public MediaControlInputElement { 25 : public MediaControlInputElement {
17 public: 26 public:
18 explicit MediaControlDownloadButtonElement(MediaControlsImpl&); 27 explicit MediaControlDownloadButtonElement(MediaControlsImpl&);
19 28
20 // Returns true if the download button should be shown. We should 29 // Returns true if the download button should be shown. We should
21 // show the button for only non-MSE, non-EME, and non-MediaStream content. 30 // show the button for only non-MSE, non-EME, and non-MediaStream content.
22 bool ShouldDisplayDownloadButton(); 31 bool ShouldDisplayDownloadButton();
23 32
24 // MediaControlInputElement overrides. 33 // MediaControlInputElement overrides.
(...skipping 22 matching lines...) Expand all
47 56
48 // UMA related boolean. They are used to prevent counting something twice 57 // UMA related boolean. They are used to prevent counting something twice
49 // for the same media element. 58 // for the same media element.
50 bool click_use_counted_ = false; 59 bool click_use_counted_ = false;
51 bool show_use_counted_ = false; 60 bool show_use_counted_ = false;
52 }; 61 };
53 62
54 } // namespace blink 63 } // namespace blink
55 64
56 #endif // MediaControlDownloadButtonElement_h 65 #endif // MediaControlDownloadButtonElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698