chromium/ui/compositor/host_begin_frame_observer.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_COMPOSITOR_HOST_BEGIN_FRAME_OBSERVER_H_
#define UI_COMPOSITOR_HOST_BEGIN_FRAME_OBSERVER_H_

#include "base/observer_list.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/viz/privileged/mojom/compositing/begin_frame_observer.mojom.h"
#include "ui/compositor/compositor_export.h"

namespace base {
class TimeTicks;
class TimeDelta;
}  // namespace base

namespace ui {

// A BeginFrameObserver implementation that forwards begin frame messages to
// registered sub-SimpleBeginFrameObservers.
//
// In case the host thread is slow, frame message scan get queued up.
// Provides coalescing of begin frame messages in this case, by gathering
// pending messages into a single message call.
class COMPOSITOR_EXPORT HostBeginFrameObserver
    : public viz::mojom::BeginFrameObserver {};

}  // namespace ui

#endif  // UI_COMPOSITOR_HOST_BEGIN_FRAME_OBSERVER_H_