Lines Matching refs:delayed
269 std::unique_ptr<DelayedTask> delayed(new DelayedTask()); in PostDelayedTask() local
270 delayed->task = std::move(task); in PostDelayedTask()
271 delayed->platform_data = shared_from_this(); in PostDelayedTask()
272 delayed->timeout = delay_in_seconds; in PostDelayedTask()
273 foreground_delayed_tasks_.Push(std::move(delayed)); in PostDelayedTask()
437 [task](const DelayedTaskPointer& delayed) -> bool { in DeleteFromScheduledTasks() argument
438 return delayed.get() == task; in DeleteFromScheduledTasks()
445 DelayedTask* delayed = ContainerOf(&DelayedTask::timer, handle); in RunForegroundTask() local
446 delayed->platform_data->RunForegroundTask(std::move(delayed->task)); in RunForegroundTask()
447 delayed->platform_data->DeleteFromScheduledTasks(delayed); in RunForegroundTask()
463 while (std::unique_ptr<DelayedTask> delayed = in FlushForegroundTasksInternal() local
466 uint64_t delay_millis = llround(delayed->timeout * 1000); in FlushForegroundTasksInternal()
468 delayed->timer.data = static_cast<void*>(delayed.get()); in FlushForegroundTasksInternal()
469 uv_timer_init(loop_, &delayed->timer); in FlushForegroundTasksInternal()
472 uv_timer_start(&delayed->timer, RunForegroundTask, delay_millis, 0); in FlushForegroundTasksInternal()
473 uv_unref(reinterpret_cast<uv_handle_t*>(&delayed->timer)); in FlushForegroundTasksInternal()
476 scheduled_delayed_tasks_.emplace_back(delayed.release(), in FlushForegroundTasksInternal()
477 [](DelayedTask* delayed) { in FlushForegroundTasksInternal() argument
478 uv_close(reinterpret_cast<uv_handle_t*>(&delayed->timer), in FlushForegroundTasksInternal()