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