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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 { | 213 { |
214 makeOpaque(); | 214 makeOpaque(); |
215 m_panel->setIsDisplayed(true); | 215 m_panel->setIsDisplayed(true); |
216 m_panel->show(); | 216 m_panel->show(); |
217 if (m_overlayPlayButton) | 217 if (m_overlayPlayButton) |
218 m_overlayPlayButton->updateDisplayType(); | 218 m_overlayPlayButton->updateDisplayType(); |
219 } | 219 } |
220 | 220 |
221 void MediaControls::mediaElementFocused() | 221 void MediaControls::mediaElementFocused() |
222 { | 222 { |
223 show(); | 223 if (mediaElement().shouldShowControls()) { |
224 resetHideMediaControlsTimer(); | 224 show(); |
| 225 resetHideMediaControlsTimer(); |
| 226 } |
225 } | 227 } |
226 | 228 |
227 void MediaControls::hide() | 229 void MediaControls::hide() |
228 { | 230 { |
229 m_panel->setIsDisplayed(false); | 231 m_panel->setIsDisplayed(false); |
230 m_panel->hide(); | 232 m_panel->hide(); |
231 if (m_overlayPlayButton) | 233 if (m_overlayPlayButton) |
232 m_overlayPlayButton->hide(); | 234 m_overlayPlayButton->hide(); |
233 } | 235 } |
234 | 236 |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 visitor->trace(m_toggleClosedCaptionsButton); | 566 visitor->trace(m_toggleClosedCaptionsButton); |
565 visitor->trace(m_fullScreenButton); | 567 visitor->trace(m_fullScreenButton); |
566 visitor->trace(m_durationDisplay); | 568 visitor->trace(m_durationDisplay); |
567 visitor->trace(m_enclosure); | 569 visitor->trace(m_enclosure); |
568 visitor->trace(m_castButton); | 570 visitor->trace(m_castButton); |
569 visitor->trace(m_overlayCastButton); | 571 visitor->trace(m_overlayCastButton); |
570 HTMLDivElement::trace(visitor); | 572 HTMLDivElement::trace(visitor); |
571 } | 573 } |
572 | 574 |
573 } | 575 } |
OLD | NEW |