| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * 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 3399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3410 if (m_asyncEventQueue->hasPendingEvents()) | 3410 if (m_asyncEventQueue->hasPendingEvents()) |
| 3411 return true; | 3411 return true; |
| 3412 | 3412 |
| 3413 return false; | 3413 return false; |
| 3414 } | 3414 } |
| 3415 | 3415 |
| 3416 bool HTMLMediaElement::isFullscreen() const { | 3416 bool HTMLMediaElement::isFullscreen() const { |
| 3417 return Fullscreen::isCurrentFullScreenElement(*this); | 3417 return Fullscreen::isCurrentFullScreenElement(*this); |
| 3418 } | 3418 } |
| 3419 | 3419 |
| 3420 void HTMLMediaElement::enterFullscreen() { | |
| 3421 BLINK_MEDIA_LOG << "enterFullscreen(" << (void*)this << ")"; | |
| 3422 | |
| 3423 Fullscreen::requestFullscreen(*this, Fullscreen::PrefixedRequest); | |
| 3424 } | |
| 3425 | |
| 3426 void HTMLMediaElement::exitFullscreen() { | |
| 3427 BLINK_MEDIA_LOG << "exitFullscreen(" << (void*)this << ")"; | |
| 3428 | |
| 3429 Fullscreen::exitFullscreen(document()); | |
| 3430 } | |
| 3431 | |
| 3432 void HTMLMediaElement::didEnterFullscreen() { | 3420 void HTMLMediaElement::didEnterFullscreen() { |
| 3433 configureMediaControls(); | 3421 configureMediaControls(); |
| 3434 if (mediaControls()) | 3422 if (mediaControls()) |
| 3435 mediaControls()->enteredFullscreen(); | 3423 mediaControls()->enteredFullscreen(); |
| 3436 // FIXME: There is no embedder-side handling in layout test mode. | 3424 // FIXME: There is no embedder-side handling in layout test mode. |
| 3437 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) | 3425 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) |
| 3438 webMediaPlayer()->enteredFullscreen(); | 3426 webMediaPlayer()->enteredFullscreen(); |
| 3439 // Cache this in case the player is destroyed before leaving fullscreen. | 3427 // Cache this in case the player is destroyed before leaving fullscreen. |
| 3440 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); | 3428 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); |
| 3441 if (m_inOverlayFullscreenVideo) | 3429 if (m_inOverlayFullscreenVideo) |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4110 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4098 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
| 4111 } | 4099 } |
| 4112 | 4100 |
| 4113 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4101 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
| 4114 m_mostlyFillingViewport = true; | 4102 m_mostlyFillingViewport = true; |
| 4115 if (m_webMediaPlayer) | 4103 if (m_webMediaPlayer) |
| 4116 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4104 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
| 4117 } | 4105 } |
| 4118 | 4106 |
| 4119 } // namespace blink | 4107 } // namespace blink |
| OLD | NEW |