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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #include "core/html/HTMLDivElement.h" | 30 #include "core/html/HTMLDivElement.h" |
31 #include "core/html/media/MediaControls.h" | 31 #include "core/html/media/MediaControls.h" |
32 #include "modules/ModulesExport.h" | 32 #include "modules/ModulesExport.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class Event; | 36 class Event; |
37 class MediaControlsMediaEventListener; | 37 class MediaControlsMediaEventListener; |
38 class MediaControlsOrientationLockDelegate; | 38 class MediaControlsOrientationLockDelegate; |
| 39 class MediaControlsRotateToFullscreenDelegate; |
39 class MediaControlsWindowEventListener; | 40 class MediaControlsWindowEventListener; |
40 class MediaControlCastButtonElement; | 41 class MediaControlCastButtonElement; |
41 class MediaControlCurrentTimeDisplayElement; | 42 class MediaControlCurrentTimeDisplayElement; |
42 class MediaControlDownloadButtonElement; | 43 class MediaControlDownloadButtonElement; |
43 class MediaControlFullscreenButtonElement; | 44 class MediaControlFullscreenButtonElement; |
44 class MediaControlMuteButtonElement; | 45 class MediaControlMuteButtonElement; |
45 class MediaControlOverflowMenuButtonElement; | 46 class MediaControlOverflowMenuButtonElement; |
46 class MediaControlOverflowMenuListElement; | 47 class MediaControlOverflowMenuListElement; |
47 class MediaControlOverlayEnclosureElement; | 48 class MediaControlOverlayEnclosureElement; |
48 class MediaControlOverlayPlayButtonElement; | 49 class MediaControlOverlayPlayButtonElement; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In | 140 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In |
140 // order to not expose accessors only for this component, a friendship is | 141 // order to not expose accessors only for this component, a friendship is |
141 // declared. | 142 // declared. |
142 friend class MediaControlsMediaEventListener; | 143 friend class MediaControlsMediaEventListener; |
143 // Same as above but handles the menus hiding when the window is interacted | 144 // Same as above but handles the menus hiding when the window is interacted |
144 // with, allowing MediaControlsImpl to not have the boilerplate. | 145 // with, allowing MediaControlsImpl to not have the boilerplate. |
145 friend class MediaControlsWindowEventListener; | 146 friend class MediaControlsWindowEventListener; |
146 | 147 |
147 // For tests. | 148 // For tests. |
148 friend class MediaControlsOrientationLockDelegateTest; | 149 friend class MediaControlsOrientationLockDelegateTest; |
| 150 friend class MediaControlsRotateToFullscreenDelegateTest; |
149 friend class MediaControlsImplTest; | 151 friend class MediaControlsImplTest; |
150 | 152 |
151 // Need to be members of MediaControls for private member access. | 153 // Need to be members of MediaControls for private member access. |
152 class BatchedControlUpdate; | 154 class BatchedControlUpdate; |
153 class MediaControlsResizeObserverCallback; | 155 class MediaControlsResizeObserverCallback; |
154 | 156 |
155 static MediaControlsImpl* Create(HTMLMediaElement&, ShadowRoot&); | 157 static MediaControlsImpl* Create(HTMLMediaElement&, ShadowRoot&); |
156 | 158 |
157 void Invalidate(Element*); | 159 void Invalidate(Element*); |
158 | 160 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 Member<MediaControlOverflowMenuButtonElement> overflow_menu_; | 240 Member<MediaControlOverflowMenuButtonElement> overflow_menu_; |
239 Member<MediaControlOverflowMenuListElement> overflow_list_; | 241 Member<MediaControlOverflowMenuListElement> overflow_list_; |
240 | 242 |
241 Member<MediaControlCastButtonElement> cast_button_; | 243 Member<MediaControlCastButtonElement> cast_button_; |
242 Member<MediaControlFullscreenButtonElement> fullscreen_button_; | 244 Member<MediaControlFullscreenButtonElement> fullscreen_button_; |
243 Member<MediaControlDownloadButtonElement> download_button_; | 245 Member<MediaControlDownloadButtonElement> download_button_; |
244 | 246 |
245 Member<MediaControlsMediaEventListener> media_event_listener_; | 247 Member<MediaControlsMediaEventListener> media_event_listener_; |
246 Member<MediaControlsWindowEventListener> window_event_listener_; | 248 Member<MediaControlsWindowEventListener> window_event_listener_; |
247 Member<MediaControlsOrientationLockDelegate> orientation_lock_delegate_; | 249 Member<MediaControlsOrientationLockDelegate> orientation_lock_delegate_; |
| 250 Member<MediaControlsRotateToFullscreenDelegate> |
| 251 rotate_to_fullscreen_delegate_; |
248 | 252 |
249 TaskRunnerTimer<MediaControlsImpl> hide_media_controls_timer_; | 253 TaskRunnerTimer<MediaControlsImpl> hide_media_controls_timer_; |
250 unsigned hide_timer_behavior_flags_; | 254 unsigned hide_timer_behavior_flags_; |
251 bool is_mouse_over_controls_ : 1; | 255 bool is_mouse_over_controls_ : 1; |
252 bool is_paused_for_scrubbing_ : 1; | 256 bool is_paused_for_scrubbing_ : 1; |
253 | 257 |
254 // Watches the video element for resize and updates media controls as | 258 // Watches the video element for resize and updates media controls as |
255 // necessary. | 259 // necessary. |
256 Member<ResizeObserver> resize_observer_; | 260 Member<ResizeObserver> resize_observer_; |
257 | 261 |
258 TaskRunnerTimer<MediaControlsImpl> element_size_changed_timer_; | 262 TaskRunnerTimer<MediaControlsImpl> element_size_changed_timer_; |
259 IntSize size_; | 263 IntSize size_; |
260 | 264 |
261 bool keep_showing_until_timer_fires_ : 1; | 265 bool keep_showing_until_timer_fires_ : 1; |
262 }; | 266 }; |
263 | 267 |
264 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); | 268 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); |
265 | 269 |
266 } // namespace blink | 270 } // namespace blink |
267 | 271 |
268 #endif | 272 #endif |
OLD | NEW |