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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 void ToggleOverflowMenu(); | 113 void ToggleOverflowMenu(); |
114 bool OverflowMenuVisible(); | 114 bool OverflowMenuVisible(); |
115 | 115 |
116 void ShowOverlayCastButtonIfNeeded(); | 116 void ShowOverlayCastButtonIfNeeded(); |
117 | 117 |
118 // Methods call by the scrubber. | 118 // Methods call by the scrubber. |
119 void BeginScrubbing(); | 119 void BeginScrubbing(); |
120 void EndScrubbing(); | 120 void EndScrubbing(); |
121 void UpdateCurrentTimeDisplay(); | 121 void UpdateCurrentTimeDisplay(); |
122 | 122 |
123 bool IsVisible() const; | |
124 void HideControlsIfNecessary(); | |
mlamouri (slow - plz ping)
2017/07/13 21:14:27
Having the buttons being able to hide the control
Khushal
2017/07/17 17:52:20
The controls will still check the internal state a
| |
125 | |
123 DECLARE_VIRTUAL_TRACE(); | 126 DECLARE_VIRTUAL_TRACE(); |
124 | 127 |
125 private: | 128 private: |
126 // MediaControlsMediaEventListener is a component that is listening to events | 129 // MediaControlsMediaEventListener is a component that is listening to events |
127 // and calling the appropriate callback on MediaControlsImpl. The object is | 130 // and calling the appropriate callback on MediaControlsImpl. The object is |
128 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In | 131 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In |
129 // order to not expose accessors only for this component, a friendship is | 132 // order to not expose accessors only for this component, a friendship is |
130 // declared. | 133 // declared. |
131 friend class MediaControlsMediaEventListener; | 134 friend class MediaControlsMediaEventListener; |
132 // Same as above but handles the menus hiding when the window is interacted | 135 // Same as above but handles the menus hiding when the window is interacted |
(...skipping 17 matching lines...) Expand all Loading... | |
150 | 153 |
151 // Notify us that our controls enclosure has changed size. | 154 // Notify us that our controls enclosure has changed size. |
152 void NotifyElementSizeChanged(ClientRect* new_size); | 155 void NotifyElementSizeChanged(ClientRect* new_size); |
153 | 156 |
154 explicit MediaControlsImpl(HTMLMediaElement&); | 157 explicit MediaControlsImpl(HTMLMediaElement&); |
155 | 158 |
156 void InitializeControls(); | 159 void InitializeControls(); |
157 | 160 |
158 void MakeOpaque(); | 161 void MakeOpaque(); |
159 void MakeTransparent(); | 162 void MakeTransparent(); |
160 bool IsVisible() const; | |
161 | 163 |
162 void UpdatePlayState(); | 164 void UpdatePlayState(); |
163 | 165 |
164 enum HideBehaviorFlags { | 166 enum HideBehaviorFlags { |
165 kIgnoreNone = 0, | 167 kIgnoreNone = 0, |
166 kIgnoreVideoHover = 1 << 0, | 168 kIgnoreVideoHover = 1 << 0, |
167 kIgnoreFocus = 1 << 1, | 169 kIgnoreFocus = 1 << 1, |
168 kIgnoreControlsHover = 1 << 2, | 170 kIgnoreControlsHover = 1 << 2, |
169 kIgnoreWaitForTimer = 1 << 3, | 171 kIgnoreWaitForTimer = 1 << 3, |
170 }; | 172 }; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 IntSize size_; | 259 IntSize size_; |
258 | 260 |
259 bool keep_showing_until_timer_fires_ : 1; | 261 bool keep_showing_until_timer_fires_ : 1; |
260 }; | 262 }; |
261 | 263 |
262 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); | 264 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); |
263 | 265 |
264 } // namespace blink | 266 } // namespace blink |
265 | 267 |
266 #endif | 268 #endif |
OLD | NEW |