OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 if (m_volumeSlider) { | 245 if (m_volumeSlider) { |
246 if (!m_mediaController->hasAudio()) | 246 if (!m_mediaController->hasAudio()) |
247 m_volumeSlider->hide(); | 247 m_volumeSlider->hide(); |
248 else { | 248 else { |
249 m_volumeSlider->show(); | 249 m_volumeSlider->show(); |
250 m_volumeSlider->setVolume(m_mediaController->volume()); | 250 m_volumeSlider->setVolume(m_mediaController->volume()); |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 #if ENABLE(FULLSCREEN_MEDIA_CONTROLS) | 254 #if ENABLE(FULLSCREEN_MEDIA_CONTROLS) |
255 if (m_mediaController->supportsFullscreen()) | 255 if (m_mediaController->supportsFullscreen() && m_mediaController->hasVideo()
) |
256 m_fullscreenButton->show(); | 256 m_fullscreenButton->show(); |
257 else | 257 else |
258 m_fullscreenButton->hide(); | 258 m_fullscreenButton->hide(); |
259 #endif | 259 #endif |
260 | 260 |
261 makeOpaque(); | 261 makeOpaque(); |
262 } | 262 } |
263 | 263 |
264 void MediaControlRootElementChromium::playbackStarted() | 264 void MediaControlRootElementChromium::playbackStarted() |
265 { | 265 { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 { | 493 { |
494 // We only need to update buffering progress when paused, during normal | 494 // We only need to update buffering progress when paused, during normal |
495 // playback playbackProgressed() will take care of it. | 495 // playback playbackProgressed() will take care of it. |
496 if (m_mediaController->paused()) | 496 if (m_mediaController->paused()) |
497 m_timeline->setPosition(m_mediaController->currentTime()); | 497 m_timeline->setPosition(m_mediaController->currentTime()); |
498 } | 498 } |
499 | 499 |
500 } | 500 } |
501 | 501 |
502 #endif | 502 #endif |
OLD | NEW |