| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return true; | 69 return true; |
| 70 } | 70 } |
| 71 | 71 |
| 72 static bool shouldShowCastButton(HTMLMediaElement& mediaElement) { | 72 static bool shouldShowCastButton(HTMLMediaElement& mediaElement) { |
| 73 return !mediaElement.fastHasAttribute(HTMLNames::disableremoteplaybackAttr) && | 73 return !mediaElement.fastHasAttribute(HTMLNames::disableremoteplaybackAttr) && |
| 74 mediaElement.hasRemoteRoutes(); | 74 mediaElement.hasRemoteRoutes(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 static bool preferHiddenVolumeControls(const Document& document) { | 77 static bool preferHiddenVolumeControls(const Document& document) { |
| 78 return !document.settings() || | 78 return !document.settings() || |
| 79 document.settings()->preferHiddenVolumeControls(); | 79 document.settings()->getPreferHiddenVolumeControls(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 class MediaControls::BatchedControlUpdate { | 82 class MediaControls::BatchedControlUpdate { |
| 83 WTF_MAKE_NONCOPYABLE(BatchedControlUpdate); | 83 WTF_MAKE_NONCOPYABLE(BatchedControlUpdate); |
| 84 STACK_ALLOCATED(); | 84 STACK_ALLOCATED(); |
| 85 | 85 |
| 86 public: | 86 public: |
| 87 explicit BatchedControlUpdate(MediaControls* controls) | 87 explicit BatchedControlUpdate(MediaControls* controls) |
| 88 : m_controls(controls) { | 88 : m_controls(controls) { |
| 89 DCHECK(isMainThread()); | 89 DCHECK(isMainThread()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // | (-internal-media-controls-text-track-list-item-input) | 203 // | (-internal-media-controls-text-track-list-item-input) |
| 204 // +-MediaControlTextTrackListItemCaptions | 204 // +-MediaControlTextTrackListItemCaptions |
| 205 // | (-internal-media-controls-text-track-list-kind-captions) | 205 // | (-internal-media-controls-text-track-list-kind-captions) |
| 206 // +-MediaControlTextTrackListItemSubtitles | 206 // +-MediaControlTextTrackListItemSubtitles |
| 207 // (-internal-media-controls-text-track-list-kind-subtitles) | 207 // (-internal-media-controls-text-track-list-kind-subtitles) |
| 208 void MediaControls::initializeControls() { | 208 void MediaControls::initializeControls() { |
| 209 MediaControlOverlayEnclosureElement* overlayEnclosure = | 209 MediaControlOverlayEnclosureElement* overlayEnclosure = |
| 210 MediaControlOverlayEnclosureElement::create(*this); | 210 MediaControlOverlayEnclosureElement::create(*this); |
| 211 | 211 |
| 212 if (document().settings() && | 212 if (document().settings() && |
| 213 document().settings()->mediaControlsOverlayPlayButtonEnabled()) { | 213 document().settings()->getMediaControlsOverlayPlayButtonEnabled()) { |
| 214 MediaControlOverlayPlayButtonElement* overlayPlayButton = | 214 MediaControlOverlayPlayButtonElement* overlayPlayButton = |
| 215 MediaControlOverlayPlayButtonElement::create(*this); | 215 MediaControlOverlayPlayButtonElement::create(*this); |
| 216 m_overlayPlayButton = overlayPlayButton; | 216 m_overlayPlayButton = overlayPlayButton; |
| 217 overlayEnclosure->appendChild(overlayPlayButton); | 217 overlayEnclosure->appendChild(overlayPlayButton); |
| 218 } | 218 } |
| 219 | 219 |
| 220 MediaControlCastButtonElement* overlayCastButton = | 220 MediaControlCastButtonElement* overlayCastButton = |
| 221 MediaControlCastButtonElement::create(*this, true); | 221 MediaControlCastButtonElement::create(*this, true); |
| 222 m_overlayCastButton = overlayCastButton; | 222 m_overlayCastButton = overlayCastButton; |
| 223 overlayEnclosure->appendChild(overlayCastButton); | 223 overlayEnclosure->appendChild(overlayCastButton); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 visitor->trace(m_overflowList); | 954 visitor->trace(m_overflowList); |
| 955 visitor->trace(m_castButton); | 955 visitor->trace(m_castButton); |
| 956 visitor->trace(m_overlayCastButton); | 956 visitor->trace(m_overlayCastButton); |
| 957 visitor->trace(m_mediaEventListener); | 957 visitor->trace(m_mediaEventListener); |
| 958 visitor->trace(m_windowEventListener); | 958 visitor->trace(m_windowEventListener); |
| 959 visitor->trace(m_orientationLockDelegate); | 959 visitor->trace(m_orientationLockDelegate); |
| 960 HTMLDivElement::trace(visitor); | 960 HTMLDivElement::trace(visitor); |
| 961 } | 961 } |
| 962 | 962 |
| 963 } // namespace blink | 963 } // namespace blink |
| OLD | NEW |