| Index: content/child/webthread_impl.cc
|
| diff --git a/content/child/webthread_impl.cc b/content/child/webthread_impl.cc
|
| index d53d06e061036ba3a2c8fb99c5bcee800471eb24..8ea673789206a61ec0070568bab6060fc3c6d405 100644
|
| --- a/content/child/webthread_impl.cc
|
| +++ b/content/child/webthread_impl.cc
|
| @@ -88,6 +88,30 @@ bool WebThreadImpl::isCurrentThread() const {
|
| return thread_->thread_id() == base::PlatformThread::CurrentId();
|
| }
|
|
|
| +void WebThreadImpl::setSharedTimerFiredFunction(
|
| + SharedTimerFunction timerFunction) {
|
| + shared_timer_function_ = timerFunction;
|
| +}
|
| +
|
| +void WebThreadImpl::setSharedTimerFireInterval(double interval_seconds) {
|
| + // See BlinkPlatformImpl::setSharedTimerFireInterval for explanation of
|
| + // why ceil is used in the interval calculation.
|
| + int64 interval = static_cast<int64>(
|
| + ceil(interval_seconds * base::Time::kMillisecondsPerSecond)
|
| + * base::Time::kMicrosecondsPerMillisecond);
|
| +
|
| + if (interval < 0)
|
| + interval = 0;
|
| +
|
| + shared_timer_.Stop();
|
| + shared_timer_.Start(FROM_HERE, base::TimeDelta::FromMicroseconds(interval),
|
| + this, &WebThreadImpl::OnTimeout);
|
| +}
|
| +
|
| +void WebThreadImpl::stopSharedTimer() {
|
| + shared_timer_.Stop();
|
| +}
|
| +
|
| WebThreadImpl::~WebThreadImpl() {
|
| thread_->Stop();
|
| }
|
|
|