| Index: Source/platform/TimerHeapEntry.cpp
|
| diff --git a/Source/platform/TimerHeapEntry.cpp b/Source/platform/TimerHeapEntry.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..728aebbb9de0772ab527ecea664f34ed757fceeb
|
| --- /dev/null
|
| +++ b/Source/platform/TimerHeapEntry.cpp
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "platform/TimerHeapEntry.h"
|
| +
|
| +#include "platform/Timer.h"
|
| +#include "platform/TimerHeap.h"
|
| +#include <limits>
|
| +
|
| +namespace blink {
|
| +
|
| +TimerHeapEntry::TimerHeapEntry(TimerHeap* owner)
|
| + : m_owner(owner)
|
| + , m_state(TimerHeapEntryNotInHeap)
|
| + , m_value(0)
|
| + , m_heapIndex(std::numeric_limits<std::size_t>::max())
|
| +{
|
| + ASSERT(m_owner);
|
| +}
|
| +
|
| +TimerHeapEntry::~TimerHeapEntry()
|
| +{
|
| +}
|
| +
|
| +void TimerHeapEntry::setValue(TimerBase& timer, double newValue)
|
| +{
|
| + ASSERT(&timer.heapEntry() == this);
|
| +
|
| + double oldValue = m_value;
|
| + m_value = newValue;
|
| + m_owner->didChangeValue(timer, oldValue);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|