Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Addressed mlamouri's comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698