| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 static WebTaskRunner* UnthrottledWebTaskRunner(); | 79 static WebTaskRunner* UnthrottledWebTaskRunner(); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 virtual void fired() = 0; | 82 virtual void fired() = 0; |
| 83 | 83 |
| 84 virtual WebTaskRunner* timerTaskRunner(); | 84 virtual WebTaskRunner* timerTaskRunner(); |
| 85 | 85 |
| 86 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 86 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 87 virtual bool canFire() const { return true; } | 87 virtual bool canFire() const { return true; } |
| 88 | 88 |
| 89 virtual double alignedFireTime(double fireTime) const { return fireTime; } | |
| 90 | |
| 91 void setNextFireTime(double now, double delay); | 89 void setNextFireTime(double now, double delay); |
| 92 | 90 |
| 93 void runInternal(); | 91 void runInternal(); |
| 94 | 92 |
| 95 class CancellableTimerTask final : public WebTaskRunner::Task { | 93 class CancellableTimerTask final : public WebTaskRunner::Task { |
| 96 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); | 94 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); |
| 97 public: | 95 public: |
| 98 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } | 96 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } |
| 99 | 97 |
| 100 ~CancellableTimerTask() override | 98 ~CancellableTimerTask() override |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 209 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 212 inline bool TimerBase::isActive() const | 210 inline bool TimerBase::isActive() const |
| 213 { | 211 { |
| 214 ASSERT(m_thread == currentThread()); | 212 ASSERT(m_thread == currentThread()); |
| 215 return m_cancellableTimerTask; | 213 return m_cancellableTimerTask; |
| 216 } | 214 } |
| 217 | 215 |
| 218 } // namespace blink | 216 } // namespace blink |
| 219 | 217 |
| 220 #endif // Timer_h | 218 #endif // Timer_h |
| OLD | NEW |