OLD | NEW |
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 MediaControlInputElement_h | 5 #ifndef MediaControlInputElement_h |
6 #define MediaControlInputElement_h | 6 #define MediaControlInputElement_h |
7 | 7 |
8 #include "core/html/HTMLInputElement.h" | 8 #include "core/html/HTMLInputElement.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/media_controls/elements/MediaControlElementBase.h" | 10 #include "modules/media_controls/elements/MediaControlElementBase.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Returns a string representation of the media control element. | 41 // Returns a string representation of the media control element. |
42 // Subclasses should override this method to return the string representation | 42 // Subclasses should override this method to return the string representation |
43 // of the overflow button. | 43 // of the overflow button. |
44 virtual WebLocalizedString::Name GetOverflowStringName() const; | 44 virtual WebLocalizedString::Name GetOverflowStringName() const; |
45 | 45 |
46 // Implements a default event handler to record interaction on click. | 46 // Implements a default event handler to record interaction on click. |
47 void DefaultEventHandler(Event*) override; | 47 void DefaultEventHandler(Event*) override; |
48 | 48 |
49 // Implements MediaControlElementBase. | 49 // Implements MediaControlElementBase. |
50 void UpdateShownState() final; | 50 void UpdateShownState() override; |
51 | 51 |
52 // Updates the value of the Text string shown in the overflow menu. | 52 // Updates the value of the Text string shown in the overflow menu. |
53 void UpdateOverflowString(); | 53 void UpdateOverflowString(); |
54 | 54 |
55 // Record interaction if it wasn't recorded yet. It is used internally for | 55 // Record interaction if it wasn't recorded yet. It is used internally for |
56 // click events but also by some elements that have complex interaction logic. | 56 // click events but also by some elements that have complex interaction logic. |
57 void MaybeRecordInteracted(); | 57 void MaybeRecordInteracted(); |
58 | 58 |
59 // Returns whether this element is used for the overflow menu. | 59 // Returns whether this element is used for the overflow menu. |
60 bool IsOverflowElement() const; | 60 bool IsOverflowElement() const; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 // Keeps track of whether the display/interaction have been recorded for the | 94 // Keeps track of whether the display/interaction have been recorded for the |
95 // CTR metrics. | 95 // CTR metrics. |
96 bool display_recorded_ = false; | 96 bool display_recorded_ = false; |
97 bool interaction_recorded_ = false; | 97 bool interaction_recorded_ = false; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
101 | 101 |
102 #endif // MediaControlInputElement_h | 102 #endif // MediaControlInputElement_h |
OLD | NEW |