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

Side by Side Diff: third_party/WebKit/Source/core/html/track/vtt/VTTRegion.h

Issue 2684633005: Move VTTRegion Timers to TaskRunnerTimer (Closed)
Patch Set: Created 3 years, 10 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void displayLastVTTCueBox(); 95 void displayLastVTTCueBox();
96 void willRemoveVTTCueBox(VTTCueBox*); 96 void willRemoveVTTCueBox(VTTCueBox*);
97 97
98 DECLARE_TRACE(); 98 DECLARE_TRACE();
99 99
100 private: 100 private:
101 VTTRegion(); 101 VTTRegion();
102 102
103 void prepareRegionDisplayTree(); 103 void prepareRegionDisplayTree();
104 104
105 void prepareScrollTimer(Document&);
106
105 // The timer is needed to continue processing when cue scrolling ended. 107 // The timer is needed to continue processing when cue scrolling ended.
106 void startTimer(); 108 void startTimer();
107 void stopTimer(); 109 void stopTimer();
108 void scrollTimerFired(TimerBase*); 110 void scrollTimerFired(TimerBase*);
109 111
110 enum RegionSetting { 112 enum RegionSetting {
111 None, 113 None,
112 Id, 114 Id,
113 Width, 115 Width,
114 Height, 116 Height,
(...skipping 28 matching lines...) Expand all
143 Member<TextTrack> m_track; 145 Member<TextTrack> m_track;
144 146
145 // Keep track of the current numeric value of the css "top" property. 147 // Keep track of the current numeric value of the css "top" property.
146 double m_currentTop; 148 double m_currentTop;
147 149
148 // The timer is used to display the next cue line after the current one has 150 // The timer is used to display the next cue line after the current one has
149 // been displayed. It's main use is for scrolling regions and it triggers as 151 // been displayed. It's main use is for scrolling regions and it triggers as
150 // soon as the animation for rolling out one line has finished, but 152 // soon as the animation for rolling out one line has finished, but
151 // currently it is used also for non-scrolling regions to use a single 153 // currently it is used also for non-scrolling regions to use a single
152 // code path. 154 // code path.
153 Timer<VTTRegion> m_scrollTimer; 155 std::unique_ptr<TaskRunnerTimer<VTTRegion>> m_scrollTimer;
haraken 2017/02/08 11:49:40 Can we just use TaskRunnerTimer<VTTRegion> ?
maksims (do not use this acc) 2017/02/08 13:02:05 Otherwise I cannot provide TaskRunnerTimer with ap
154 }; 156 };
155 157
156 } // namespace blink 158 } // namespace blink
157 159
158 #endif // VTTRegion_h 160 #endif // VTTRegion_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698