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