// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_SIMPLE_MAIN_THREAD_SCHEDULER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_SIMPLE_MAIN_THREAD_SCHEDULER_H_ #include <memory> #include "base/memory/raw_ptr.h" #include "base/task/single_thread_task_runner.h" #include "third_party/blink/public/platform/scheduler/web_agent_group_scheduler.h" #include "third_party/blink/renderer/platform/scheduler/public/main_thread_scheduler.h" namespace blink { namespace scheduler { // ThreadScheduler implementation that should be used when you don't have a // dedicated ThreadScheduler instance. This is essentially a scheduler doesn't // really schedule anything -- it just runs tasks as they come. // // This scheduler does not implement several features (see comments at each // function). If you invoke a Blink functionality that relies on an // unimplemented scheduler function, you might observe crashes or misbehavior. // Apparently we don't rely on those missing features at least for things that // use this scheduler. class SimpleMainThreadScheduler : public MainThreadScheduler { … }; } // namespace scheduler } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_SIMPLE_MAIN_THREAD_SCHEDULER_H_