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