chromium/content/browser/renderer_host/frame_token_message_queue.h

// 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 CONTENT_BROWSER_RENDERER_HOST_FRAME_TOKEN_MESSAGE_QUEUE_H_
#define CONTENT_BROWSER_RENDERER_HOST_FRAME_TOKEN_MESSAGE_QUEUE_H_

#include <map>
#include <vector>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "content/common/content_export.h"

namespace content {

// The Renderer sends various messages which are not to be processed until after
// their associated frame has been processed. These messages are provided with a
// FrameToken to be used for synchronizing.
//
// Viz processes the frames, after which it notifies the Browser of which
// FrameToken has completed processing.
//
// Non-IPC callbacks can be enqueued with EnqueueOrRunFrameTokenCallback.
//
// Upon receipt of DidProcessFrame all Messages associated with the provided
// FrameToken are then dispatched, and all enqueued callbacks are ran.
class CONTENT_EXPORT FrameTokenMessageQueue {};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_FRAME_TOKEN_MESSAGE_QUEUE_H_