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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 panel_->MakeOpaque(); | 522 panel_->MakeOpaque(); |
523 } | 523 } |
524 | 524 |
525 void MediaControlsImpl::MakeTransparent() { | 525 void MediaControlsImpl::MakeTransparent() { |
526 panel_->MakeTransparent(); | 526 panel_->MakeTransparent(); |
527 } | 527 } |
528 | 528 |
529 bool MediaControlsImpl::ShouldHideMediaControls(unsigned behavior_flags) const { | 529 bool MediaControlsImpl::ShouldHideMediaControls(unsigned behavior_flags) const { |
530 // Never hide for a media element without visual representation. | 530 // Never hide for a media element without visual representation. |
531 if (!MediaElement().IsHTMLVideoElement() || !MediaElement().HasVideo() || | 531 if (!MediaElement().IsHTMLVideoElement() || !MediaElement().HasVideo() || |
532 MediaElement().IsPlayingRemotely()) { | 532 MediaElement().IsPlayingRemotely() || |
| 533 toHTMLVideoElement(MediaElement()).GetMediaRemotingStatus() == |
| 534 HTMLVideoElement::MediaRemotingStatus::kStarted) { |
533 return false; | 535 return false; |
534 } | 536 } |
535 | 537 |
536 // Keep the controls visible as long as the timer is running. | 538 // Keep the controls visible as long as the timer is running. |
537 const bool ignore_wait_for_timer = behavior_flags & kIgnoreWaitForTimer; | 539 const bool ignore_wait_for_timer = behavior_flags & kIgnoreWaitForTimer; |
538 if (!ignore_wait_for_timer && keep_showing_until_timer_fires_) | 540 if (!ignore_wait_for_timer && keep_showing_until_timer_fires_) |
539 return false; | 541 return false; |
540 | 542 |
541 // Don't hide if the mouse is over the controls. | 543 // Don't hide if the mouse is over the controls. |
542 const bool ignore_controls_hover = behavior_flags & kIgnoreControlsHover; | 544 const bool ignore_controls_hover = behavior_flags & kIgnoreControlsHover; |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 visitor->Trace(cast_button_); | 1136 visitor->Trace(cast_button_); |
1135 visitor->Trace(overlay_cast_button_); | 1137 visitor->Trace(overlay_cast_button_); |
1136 visitor->Trace(media_event_listener_); | 1138 visitor->Trace(media_event_listener_); |
1137 visitor->Trace(window_event_listener_); | 1139 visitor->Trace(window_event_listener_); |
1138 visitor->Trace(orientation_lock_delegate_); | 1140 visitor->Trace(orientation_lock_delegate_); |
1139 MediaControls::Trace(visitor); | 1141 MediaControls::Trace(visitor); |
1140 HTMLDivElement::Trace(visitor); | 1142 HTMLDivElement::Trace(visitor); |
1141 } | 1143 } |
1142 | 1144 |
1143 } // namespace blink | 1145 } // namespace blink |
OLD | NEW |