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

Side by Side Diff: Source/WebCore/html/shadow/MediaControlsChromium.cpp

Issue 13454026: Update all float attributes in HTMLMediaElement and related objects to double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change WebMediaPlayer to only have the xxxFloat methods. Created 7 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) 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, 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (m_enclosure) 149 if (m_enclosure)
150 m_enclosure->setMediaController(controller); 150 m_enclosure->setMediaController(controller);
151 } 151 }
152 152
153 void MediaControlsChromium::reset() 153 void MediaControlsChromium::reset()
154 { 154 {
155 Page* page = document()->page(); 155 Page* page = document()->page();
156 if (!page) 156 if (!page)
157 return; 157 return;
158 158
159 float duration = m_mediaController->duration(); 159 double duration = m_mediaController->duration();
160 m_durationDisplay->setInnerText(page->theme()->formatMediaControlsTime(durat ion), ASSERT_NO_EXCEPTION); 160 m_durationDisplay->setInnerText(page->theme()->formatMediaControlsTime(durat ion), ASSERT_NO_EXCEPTION);
161 m_durationDisplay->setCurrentValue(duration); 161 m_durationDisplay->setCurrentValue(duration);
162 162
163 MediaControls::reset(); 163 MediaControls::reset();
164 } 164 }
165 165
166 void MediaControlsChromium::playbackStarted() 166 void MediaControlsChromium::playbackStarted()
167 { 167 {
168 m_currentTimeDisplay->show(); 168 m_currentTimeDisplay->show();
169 m_durationDisplay->hide(); 169 m_durationDisplay->hide();
170 170
171 MediaControls::playbackStarted(); 171 MediaControls::playbackStarted();
172 } 172 }
173 173
174 void MediaControlsChromium::updateCurrentTimeDisplay() 174 void MediaControlsChromium::updateCurrentTimeDisplay()
175 { 175 {
176 float now = m_mediaController->currentTime(); 176 double now = m_mediaController->currentTime();
177 float duration = m_mediaController->duration(); 177 double duration = m_mediaController->duration();
178 178
179 Page* page = document()->page(); 179 Page* page = document()->page();
180 if (!page) 180 if (!page)
181 return; 181 return;
182 182
183 // After seek, hide duration display and show current time. 183 // After seek, hide duration display and show current time.
184 if (now > 0) { 184 if (now > 0) {
185 m_currentTimeDisplay->show(); 185 m_currentTimeDisplay->show();
186 m_durationDisplay->hide(); 186 m_durationDisplay->hide();
187 } 187 }
(...skipping 27 matching lines...) Expand all
215 215
216 // Insert it before the first controller element so it always displays behin d the controls. 216 // Insert it before the first controller element so it always displays behin d the controls.
217 // In the Chromium case, that's the enclosure element. 217 // In the Chromium case, that's the enclosure element.
218 insertBefore(textDisplayContainer.release(), m_enclosure, ASSERT_NO_EXCEPTIO N, AttachLazily); 218 insertBefore(textDisplayContainer.release(), m_enclosure, ASSERT_NO_EXCEPTIO N, AttachLazily);
219 } 219 }
220 #endif 220 #endif
221 221
222 } 222 }
223 223
224 #endif 224 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698