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

Side by Side Diff: third_party/WebKit/Source/platform/Timer.h

Issue 2290243002: Make blink::TimerBase own the WebTaskRunner for timer task (Closed)
Patch Set: use adoptRef Created 4 years, 3 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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 private: 125 private:
126 TimerBase* m_timer; // NOT OWNED 126 TimerBase* m_timer; // NOT OWNED
127 }; 127 };
128 128
129 double m_nextFireTime; // 0 if inactive 129 double m_nextFireTime; // 0 if inactive
130 double m_repeatInterval; // 0 if not repeating 130 double m_repeatInterval; // 0 if not repeating
131 WebTraceLocation m_location; 131 WebTraceLocation m_location;
132 CancellableTimerTask* m_cancellableTimerTask; // NOT OWNED 132 CancellableTimerTask* m_cancellableTimerTask; // NOT OWNED
133 WebTaskRunner* m_webTaskRunner; // Not owned. 133 std::unique_ptr<WebTaskRunner> m_webTaskRunner;
134 134
135 #if DCHECK_IS_ON() 135 #if DCHECK_IS_ON()
136 ThreadIdentifier m_thread; 136 ThreadIdentifier m_thread;
137 #endif 137 #endif
138 138
139 friend class ThreadTimers; 139 friend class ThreadTimers;
140 friend class TimerHeapLessThanFunction; 140 friend class TimerHeapLessThanFunction;
141 friend class TimerHeapReference; 141 friend class TimerHeapReference;
142 }; 142 };
143 143
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 NO_LAZY_SWEEP_SANITIZE_ADDRESS 226 NO_LAZY_SWEEP_SANITIZE_ADDRESS
227 inline bool TimerBase::isActive() const 227 inline bool TimerBase::isActive() const
228 { 228 {
229 ASSERT(m_thread == currentThread()); 229 ASSERT(m_thread == currentThread());
230 return m_cancellableTimerTask; 230 return m_cancellableTimerTask;
231 } 231 }
232 232
233 } // namespace blink 233 } // namespace blink
234 234
235 #endif // Timer_h 235 #endif // Timer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp ('k') | third_party/WebKit/Source/platform/Timer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698