| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 m_panel->makeOpaque(); | 510 m_panel->makeOpaque(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 void MediaControls::makeTransparent() { | 513 void MediaControls::makeTransparent() { |
| 514 m_panel->makeTransparent(); | 514 m_panel->makeTransparent(); |
| 515 } | 515 } |
| 516 | 516 |
| 517 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const { | 517 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const { |
| 518 // Never hide for a media element without visual representation. | 518 // Never hide for a media element without visual representation. |
| 519 if (!mediaElement().isHTMLVideoElement() || !mediaElement().hasVideo() || | 519 if (!mediaElement().isHTMLVideoElement() || !mediaElement().hasVideo() || |
| 520 mediaElement().isPlayingRemotely()) { | 520 mediaElement().isPlayingRemotely() || |
| 521 mediaElement().isMediaRemotingStarted()) { |
| 521 return false; | 522 return false; |
| 522 } | 523 } |
| 523 | 524 |
| 524 // Keep the controls visible as long as the timer is running. | 525 // Keep the controls visible as long as the timer is running. |
| 525 const bool ignoreWaitForTimer = behaviorFlags & IgnoreWaitForTimer; | 526 const bool ignoreWaitForTimer = behaviorFlags & IgnoreWaitForTimer; |
| 526 if (!ignoreWaitForTimer && m_keepShowingUntilTimerFires) | 527 if (!ignoreWaitForTimer && m_keepShowingUntilTimerFires) |
| 527 return false; | 528 return false; |
| 528 | 529 |
| 529 // Don't hide if the mouse is over the controls. | 530 // Don't hide if the mouse is over the controls. |
| 530 const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; | 531 const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 visitor->trace(m_overflowList); | 1101 visitor->trace(m_overflowList); |
| 1101 visitor->trace(m_castButton); | 1102 visitor->trace(m_castButton); |
| 1102 visitor->trace(m_overlayCastButton); | 1103 visitor->trace(m_overlayCastButton); |
| 1103 visitor->trace(m_mediaEventListener); | 1104 visitor->trace(m_mediaEventListener); |
| 1104 visitor->trace(m_windowEventListener); | 1105 visitor->trace(m_windowEventListener); |
| 1105 visitor->trace(m_orientationLockDelegate); | 1106 visitor->trace(m_orientationLockDelegate); |
| 1106 HTMLDivElement::trace(visitor); | 1107 HTMLDivElement::trace(visitor); |
| 1107 } | 1108 } |
| 1108 | 1109 |
| 1109 } // namespace blink | 1110 } // namespace blink |
| OLD | NEW |