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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // FIXME: Racing a transition with a setTimeout like this is wrong. 163 // FIXME: Racing a transition with a setTimeout like this is wrong.
164 m_transitionTimer.startOneShot(fadeOutDuration, BLINK_FROM_HERE); 164 m_transitionTimer.startOneShot(fadeOutDuration, BLINK_FROM_HERE);
165 } 165 }
166 166
167 void MediaControlPanelElement::stopTimer() 167 void MediaControlPanelElement::stopTimer()
168 { 168 {
169 if (m_transitionTimer.isActive()) 169 if (m_transitionTimer.isActive())
170 m_transitionTimer.stop(); 170 m_transitionTimer.stop();
171 } 171 }
172 172
173 void MediaControlPanelElement::transitionTimerFired(Timer<MediaControlPanelEleme nt>*) 173 void MediaControlPanelElement::transitionTimerFired(TimerBase*)
174 { 174 {
175 if (!m_opaque) 175 if (!m_opaque)
176 setIsWanted(false); 176 setIsWanted(false);
177 177
178 stopTimer(); 178 stopTimer();
179 } 179 }
180 180
181 void MediaControlPanelElement::didBecomeVisible() 181 void MediaControlPanelElement::didBecomeVisible()
182 { 182 {
183 DCHECK(m_isDisplayed && m_opaque); 183 DCHECK(m_isDisplayed && m_opaque);
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } 852 }
853 853
854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr eate(MediaControls& mediaControls) 854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr eate(MediaControls& mediaControls)
855 { 855 {
856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime DisplayElement(mediaControls); 856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime DisplayElement(mediaControls);
857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display")); 857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display"));
858 return element; 858 return element;
859 } 859 }
860 860
861 } // namespace blink 861 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698