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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 void MediaControls::makeTransparent() | 220 void MediaControls::makeTransparent() |
221 { | 221 { |
222 m_panel->makeTransparent(); | 222 m_panel->makeTransparent(); |
223 } | 223 } |
224 | 224 |
225 bool MediaControls::shouldHideControls() | 225 bool MediaControls::shouldHideControls() |
226 { | 226 { |
227 return !m_panel->hovered(); | 227 return !m_panel->hovered(); |
228 } | 228 } |
229 | 229 |
230 void MediaControls::bufferingProgressed() | |
231 { | |
232 // We only need to update buffering progress when paused, during normal | |
233 // playback playbackProgressed() will take care of it. | |
234 if (m_mediaController->paused()) | |
235 m_timeline->setPosition(m_mediaController->currentTime()); | |
acolwell GONE FROM CHROMIUM
2014/03/06 21:33:51
So we are relying on the playbackStopped() & playb
philipj_slow
2014/03/07 05:44:09
Good catch! I was able to trigger this bug even wi
| |
236 } | |
237 | |
238 void MediaControls::playbackStarted() | 230 void MediaControls::playbackStarted() |
239 { | 231 { |
240 m_currentTimeDisplay->show(); | 232 m_currentTimeDisplay->show(); |
241 m_durationDisplay->hide(); | 233 m_durationDisplay->hide(); |
242 | 234 |
243 m_playButton->updateDisplayType(); | 235 m_playButton->updateDisplayType(); |
244 m_timeline->setPosition(m_mediaController->currentTime()); | 236 m_timeline->setPosition(m_mediaController->currentTime()); |
acolwell GONE FROM CHROMIUM
2014/03/06 21:33:51
looks like this should just be moved into updateCu
philipj_slow
2014/03/07 05:44:09
Yeah, making updateCurrentTimeDisplay() into somet
| |
245 updateCurrentTimeDisplay(); | 237 updateCurrentTimeDisplay(); |
246 | 238 |
247 if (m_isFullscreen) | 239 if (m_isFullscreen) |
248 startHideFullscreenControlsTimer(); | 240 startHideFullscreenControlsTimer(); |
249 } | 241 } |
250 | 242 |
251 void MediaControls::playbackProgressed() | 243 void MediaControls::playbackProgressed() |
252 { | 244 { |
253 m_timeline->setPosition(m_mediaController->currentTime()); | 245 m_timeline->setPosition(m_mediaController->currentTime()); |
254 updateCurrentTimeDisplay(); | 246 updateCurrentTimeDisplay(); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 m_textDisplayContainer->updateDisplay(); | 446 m_textDisplayContainer->updateDisplay(); |
455 } | 447 } |
456 | 448 |
457 void MediaControls::insertTextTrackContainer(PassRefPtr<MediaControlTextTrackCon tainerElement> textTrackContainer) | 449 void MediaControls::insertTextTrackContainer(PassRefPtr<MediaControlTextTrackCon tainerElement> textTrackContainer) |
458 { | 450 { |
459 // Insert it before the first controller element so it always displays behin d the controls. | 451 // Insert it before the first controller element so it always displays behin d the controls. |
460 insertBefore(textTrackContainer, m_enclosure); | 452 insertBefore(textTrackContainer, m_enclosure); |
461 } | 453 } |
462 | 454 |
463 } | 455 } |
OLD | NEW |