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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 void MediaControls::makeTransparent() | 239 void MediaControls::makeTransparent() |
240 { | 240 { |
241 m_panel->makeTransparent(); | 241 m_panel->makeTransparent(); |
242 } | 242 } |
243 | 243 |
244 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const | 244 bool MediaControls::shouldHideMediaControls(unsigned behaviorFlags) const |
245 { | 245 { |
246 // Never hide for a media element without visual representation. | 246 // Never hide for a media element without visual representation. |
247 if (!mediaElement().hasVideo()) | 247 if (!mediaElement().hasVideo() || mediaElement().isPlayingRemotely()) |
248 return false; | 248 return false; |
249 // Don't hide if the mouse is over the controls. | 249 // Don't hide if the mouse is over the controls. |
250 const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; | 250 const bool ignoreControlsHover = behaviorFlags & IgnoreControlsHover; |
251 if (!ignoreControlsHover && m_panel->hovered()) | 251 if (!ignoreControlsHover && m_panel->hovered()) |
252 return false; | 252 return false; |
253 // Don't hide if the mouse is over the video area. | 253 // Don't hide if the mouse is over the video area. |
254 const bool ignoreVideoHover = behaviorFlags & IgnoreVideoHover; | 254 const bool ignoreVideoHover = behaviorFlags & IgnoreVideoHover; |
255 if (!ignoreVideoHover && m_isMouseOverControls) | 255 if (!ignoreVideoHover && m_isMouseOverControls) |
256 return false; | 256 return false; |
257 // Don't hide if focus is on the HTMLMediaElement or within the | 257 // Don't hide if focus is on the HTMLMediaElement or within the |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 visitor->trace(m_toggleClosedCaptionsButton); | 557 visitor->trace(m_toggleClosedCaptionsButton); |
558 visitor->trace(m_fullScreenButton); | 558 visitor->trace(m_fullScreenButton); |
559 visitor->trace(m_durationDisplay); | 559 visitor->trace(m_durationDisplay); |
560 visitor->trace(m_enclosure); | 560 visitor->trace(m_enclosure); |
561 visitor->trace(m_castButton); | 561 visitor->trace(m_castButton); |
562 visitor->trace(m_overlayCastButton); | 562 visitor->trace(m_overlayCastButton); |
563 HTMLDivElement::trace(visitor); | 563 HTMLDivElement::trace(visitor); |
564 } | 564 } |
565 | 565 |
566 } | 566 } |
OLD | NEW |