// Copyright 2019 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_PUBLIC_WIDGET_SCHEDULER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_WIDGET_SCHEDULER_H_ #include "base/task/single_thread_task_runner.h" #include "third_party/blink/public/common/input/web_input_event.h" #include "third_party/blink/public/platform/web_input_event_result.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h" namespace viz { struct BeginFrameArgs; } // namespace viz namespace blink { class WebInputEventAttribution; namespace scheduler { // A new WidgetScheduler should be allocated for each Widget created. This // class is ThreadSafeRefCounted because some of its methods can be invoked // from the compositor thread. Each method is marked in what context it // will be called. Destruction of the class can happen on any thread // and thread specific shutdown code should be performed in the `Shutdown` // method. The `Shutdown` method should be invoked on the main thread before // the reference is released on that thread. class PLATFORM_EXPORT WidgetScheduler : public ThreadSafeRefCounted<WidgetScheduler> { … }; } // namespace scheduler } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_WIDGET_SCHEDULER_H_