| 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 |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "modules/media_controls/MediaControlsImpl.h" | 27 #include "modules/media_controls/MediaControlsImpl.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 30 #include "core/dom/ClientRect.h" | |
| 31 #include "core/dom/Fullscreen.h" | 30 #include "core/dom/Fullscreen.h" |
| 32 #include "core/dom/MutationCallback.h" | 31 #include "core/dom/MutationCallback.h" |
| 33 #include "core/dom/MutationObserver.h" | 32 #include "core/dom/MutationObserver.h" |
| 34 #include "core/dom/MutationObserverInit.h" | 33 #include "core/dom/MutationObserverInit.h" |
| 35 #include "core/dom/MutationRecord.h" | 34 #include "core/dom/MutationRecord.h" |
| 36 #include "core/dom/ResizeObserver.h" | 35 #include "core/dom/ResizeObserver.h" |
| 37 #include "core/dom/ResizeObserverEntry.h" | 36 #include "core/dom/ResizeObserverEntry.h" |
| 38 #include "core/dom/TaskRunnerHelper.h" | 37 #include "core/dom/TaskRunnerHelper.h" |
| 39 #include "core/events/KeyboardEvent.h" | 38 #include "core/events/KeyboardEvent.h" |
| 40 #include "core/events/MouseEvent.h" | 39 #include "core/events/MouseEvent.h" |
| 41 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 42 #include "core/frame/UseCounter.h" | 41 #include "core/frame/UseCounter.h" |
| 42 #include "core/geometry/DOMRect.h" |
| 43 #include "core/html/HTMLMediaElement.h" | 43 #include "core/html/HTMLMediaElement.h" |
| 44 #include "core/html/HTMLVideoElement.h" | 44 #include "core/html/HTMLVideoElement.h" |
| 45 #include "core/html/media/AutoplayPolicy.h" | 45 #include "core/html/media/AutoplayPolicy.h" |
| 46 #include "core/html/media/HTMLMediaElementControlsList.h" | 46 #include "core/html/media/HTMLMediaElementControlsList.h" |
| 47 #include "core/html/track/TextTrackContainer.h" | 47 #include "core/html/track/TextTrackContainer.h" |
| 48 #include "core/html/track/TextTrackList.h" | 48 #include "core/html/track/TextTrackList.h" |
| 49 #include "core/layout/LayoutObject.h" | 49 #include "core/layout/LayoutObject.h" |
| 50 #include "core/layout/LayoutTheme.h" | 50 #include "core/layout/LayoutTheme.h" |
| 51 #include "core/page/SpatialNavigation.h" | 51 #include "core/page/SpatialNavigation.h" |
| 52 #include "modules/media_controls/MediaControlsMediaEventListener.h" | 52 #include "modules/media_controls/MediaControlsMediaEventListener.h" |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 StartHideMediaControlsTimer(); | 1022 StartHideMediaControlsTimer(); |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 void MediaControlsImpl::OnPanelKeypress() { | 1025 void MediaControlsImpl::OnPanelKeypress() { |
| 1026 // If the user is interacting with the controls via the keyboard, don't hide | 1026 // If the user is interacting with the controls via the keyboard, don't hide |
| 1027 // the controls. This is called when the user mutes/unmutes, turns CC on/off, | 1027 // the controls. This is called when the user mutes/unmutes, turns CC on/off, |
| 1028 // etc. | 1028 // etc. |
| 1029 ResetHideMediaControlsTimer(); | 1029 ResetHideMediaControlsTimer(); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 void MediaControlsImpl::NotifyElementSizeChanged(ClientRect* new_size) { | 1032 void MediaControlsImpl::NotifyElementSizeChanged(DOMRect* new_size) { |
| 1033 // Note that this code permits a bad frame on resize, since it is | 1033 // Note that this code permits a bad frame on resize, since it is |
| 1034 // run after the relayout / paint happens. It would be great to improve | 1034 // run after the relayout / paint happens. It would be great to improve |
| 1035 // this, but it would be even greater to move this code entirely to | 1035 // this, but it would be even greater to move this code entirely to |
| 1036 // JS and fix it there. | 1036 // JS and fix it there. |
| 1037 | 1037 |
| 1038 IntSize old_size = size_; | 1038 IntSize old_size = size_; |
| 1039 size_.SetWidth(new_size->width()); | 1039 size_.SetWidth(new_size->width()); |
| 1040 size_.SetHeight(new_size->height()); | 1040 size_.SetHeight(new_size->height()); |
| 1041 | 1041 |
| 1042 // Adjust for effective zoom. | 1042 // Adjust for effective zoom. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 visitor->Trace(overlay_cast_button_); | 1239 visitor->Trace(overlay_cast_button_); |
| 1240 visitor->Trace(media_event_listener_); | 1240 visitor->Trace(media_event_listener_); |
| 1241 visitor->Trace(window_event_listener_); | 1241 visitor->Trace(window_event_listener_); |
| 1242 visitor->Trace(orientation_lock_delegate_); | 1242 visitor->Trace(orientation_lock_delegate_); |
| 1243 visitor->Trace(rotate_to_fullscreen_delegate_); | 1243 visitor->Trace(rotate_to_fullscreen_delegate_); |
| 1244 MediaControls::Trace(visitor); | 1244 MediaControls::Trace(visitor); |
| 1245 HTMLDivElement::Trace(visitor); | 1245 HTMLDivElement::Trace(visitor); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 } // namespace blink | 1248 } // namespace blink |
| OLD | NEW |