OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 28 matching lines...) Expand all Loading... |
39 class CORE_EXPORT MediaControls final : public HTMLDivElement { | 39 class CORE_EXPORT MediaControls final : public HTMLDivElement { |
40 public: | 40 public: |
41 static MediaControls* create(HTMLMediaElement&); | 41 static MediaControls* create(HTMLMediaElement&); |
42 | 42 |
43 HTMLMediaElement& mediaElement() const { return *m_mediaElement; } | 43 HTMLMediaElement& mediaElement() const { return *m_mediaElement; } |
44 | 44 |
45 void reset(); | 45 void reset(); |
46 | 46 |
47 void show(); | 47 void show(); |
48 void hide(); | 48 void hide(); |
| 49 bool isVisible() const; |
49 | 50 |
50 void playbackStarted(); | 51 void playbackStarted(); |
51 void playbackProgressed(); | 52 void playbackProgressed(); |
52 void playbackStopped(); | 53 void playbackStopped(); |
53 | 54 |
54 void beginScrubbing(); | 55 void beginScrubbing(); |
55 void endScrubbing(); | 56 void endScrubbing(); |
56 | 57 |
57 void updateCurrentTimeDisplay(); | 58 void updateCurrentTimeDisplay(); |
58 | 59 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 void makeOpaque(); | 117 void makeOpaque(); |
117 void makeTransparent(); | 118 void makeTransparent(); |
118 | 119 |
119 void updatePlayState(); | 120 void updatePlayState(); |
120 | 121 |
121 enum HideBehaviorFlags { | 122 enum HideBehaviorFlags { |
122 IgnoreNone = 0, | 123 IgnoreNone = 0, |
123 IgnoreVideoHover = 1 << 0, | 124 IgnoreVideoHover = 1 << 0, |
124 IgnoreFocus = 1 << 1, | 125 IgnoreFocus = 1 << 1, |
125 IgnoreControlsHover = 1 << 2 | 126 IgnoreControlsHover = 1 << 2, |
| 127 IgnoreWaitForTimer = 1 << 3, |
126 }; | 128 }; |
127 | 129 |
128 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; | 130 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; |
129 void hideMediaControlsTimerFired(TimerBase*); | 131 void hideMediaControlsTimerFired(TimerBase*); |
130 void startHideMediaControlsTimer(); | 132 void startHideMediaControlsTimer(); |
131 void stopHideMediaControlsTimer(); | 133 void stopHideMediaControlsTimer(); |
132 void resetHideMediaControlsTimer(); | 134 void resetHideMediaControlsTimer(); |
133 | 135 |
134 void panelWidthChangedTimerFired(TimerBase*); | 136 void panelWidthChangedTimerFired(TimerBase*); |
135 | 137 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 175 |
174 Timer<MediaControls> m_hideMediaControlsTimer; | 176 Timer<MediaControls> m_hideMediaControlsTimer; |
175 unsigned m_hideTimerBehaviorFlags; | 177 unsigned m_hideTimerBehaviorFlags; |
176 bool m_isMouseOverControls : 1; | 178 bool m_isMouseOverControls : 1; |
177 bool m_isPausedForScrubbing : 1; | 179 bool m_isPausedForScrubbing : 1; |
178 | 180 |
179 Timer<MediaControls> m_panelWidthChangedTimer; | 181 Timer<MediaControls> m_panelWidthChangedTimer; |
180 int m_panelWidth; | 182 int m_panelWidth; |
181 | 183 |
182 bool m_allowHiddenVolumeControls : 1; | 184 bool m_allowHiddenVolumeControls : 1; |
| 185 bool m_keepShowingUntilTimerFires : 1; |
183 }; | 186 }; |
184 | 187 |
185 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 188 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
186 | 189 |
187 } // namespace blink | 190 } // namespace blink |
188 | 191 |
189 #endif | 192 #endif |
OLD | NEW |