| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 301 } | 301 } | 
| 302 | 302 | 
| 303 void MediaControls::makeOpaque() | 303 void MediaControls::makeOpaque() | 
| 304 { | 304 { | 
| 305     m_panel->makeOpaque(); | 305     m_panel->makeOpaque(); | 
| 306 } | 306 } | 
| 307 | 307 | 
| 308 void MediaControls::makeTransparent() | 308 void MediaControls::makeTransparent() | 
| 309 { | 309 { | 
| 310     m_panel->makeTransparent(); | 310     m_panel->makeTransparent(); | 
| 311     m_overlayCastButton->setIsWanted(false); |  | 
| 312 } | 311 } | 
| 313 | 312 | 
| 314 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const | 313 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const | 
| 315 { | 314 { | 
| 316     // Never hide for a media element without visual representation. | 315     // Never hide for a media element without visual representation. | 
| 317     if (!mediaElement().hasVideo() || mediaElement().isPlayingRemotely()) | 316     if (!mediaElement().hasVideo() || mediaElement().isPlayingRemotely()) | 
| 318         return false; | 317         return false; | 
| 319     // Don't hide if the mouse is over the controls. | 318     // Don't hide if the mouse is over the controls. | 
| 320     const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; | 319     const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; | 
| 321     if (!ignoreControlsHover && m_panel->hovered()) | 320     if (!ignoreControlsHover && m_panel->hovered()) | 
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 598     unsigned behaviorFlags = m_hideTimerBehaviorFlags | IgnoreFocus | IgnoreVide
     oHover; | 597     unsigned behaviorFlags = m_hideTimerBehaviorFlags | IgnoreFocus | IgnoreVide
     oHover; | 
| 599     m_hideTimerBehaviorFlags = IgnoreNone; | 598     m_hideTimerBehaviorFlags = IgnoreNone; | 
| 600 | 599 | 
| 601     if (mediaElement().togglePlayStateWillPlay()) | 600     if (mediaElement().togglePlayStateWillPlay()) | 
| 602         return; | 601         return; | 
| 603 | 602 | 
| 604     if (!shouldHideMediaControls(behaviorFlags)) | 603     if (!shouldHideMediaControls(behaviorFlags)) | 
| 605         return; | 604         return; | 
| 606 | 605 | 
| 607     makeTransparent(); | 606     makeTransparent(); | 
|  | 607     m_overlayCastButton->setIsWanted(false); | 
| 608 } | 608 } | 
| 609 | 609 | 
| 610 void MediaControls::startHideMediaControlsTimer() | 610 void MediaControls::startHideMediaControlsTimer() | 
| 611 { | 611 { | 
| 612     m_hideMediaControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingMe
     diaControls, FROM_HERE); | 612     m_hideMediaControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingMe
     diaControls, FROM_HERE); | 
| 613 } | 613 } | 
| 614 | 614 | 
| 615 void MediaControls::stopHideMediaControlsTimer() | 615 void MediaControls::stopHideMediaControlsTimer() | 
| 616 { | 616 { | 
| 617     m_hideMediaControlsTimer.stop(); | 617     m_hideMediaControlsTimer.stop(); | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 736     visitor->trace(m_toggleClosedCaptionsButton); | 736     visitor->trace(m_toggleClosedCaptionsButton); | 
| 737     visitor->trace(m_fullScreenButton); | 737     visitor->trace(m_fullScreenButton); | 
| 738     visitor->trace(m_durationDisplay); | 738     visitor->trace(m_durationDisplay); | 
| 739     visitor->trace(m_enclosure); | 739     visitor->trace(m_enclosure); | 
| 740     visitor->trace(m_castButton); | 740     visitor->trace(m_castButton); | 
| 741     visitor->trace(m_overlayCastButton); | 741     visitor->trace(m_overlayCastButton); | 
| 742     HTMLDivElement::trace(visitor); | 742     HTMLDivElement::trace(visitor); | 
| 743 } | 743 } | 
| 744 | 744 | 
| 745 } | 745 } | 
| OLD | NEW | 
|---|