blob: 2c31b90639be0c66b1af6c60ae6355eefa408369 [file] [log] [blame]
[email protected]586871b2014-07-22 17:05:111// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Sadrul Habib Chowdhury31c98712018-12-11 04:15:135#ifndef CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_
6#define CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_
[email protected]586871b2014-07-22 17:05:117
avi1023d012015-12-25 02:39:148#include <stdint.h>
9
[email protected]586871b2014-07-22 17:05:1110#include "base/memory/ref_counted.h"
danakjba65a0912017-09-21 16:38:4211#include "cc/trees/swap_promise.h"
[email protected]586871b2014-07-22 17:05:1112
13namespace IPC {
14class SyncMessageFilter;
15}
16
17namespace content {
18
19class FrameSwapMessageQueue;
20
21class QueueMessageSwapPromise : public cc::SwapPromise {
22 public:
23 QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender,
24 scoped_refptr<FrameSwapMessageQueue> message_queue,
25 int source_frame_number);
26
dcheng6d18e402014-10-21 12:32:5227 ~QueueMessageSwapPromise() override;
[email protected]586871b2014-07-22 17:05:1128
tobiasjs93d464842015-05-15 17:52:4429 void DidActivate() override;
Sadrul Habib Chowdhury24856212018-05-25 21:38:4330 void WillSwap(viz::CompositorFrameMetadata* metadata) override;
samanse7345c82016-12-16 02:51:1631 void DidSwap() override;
Bo Liudef993a2019-04-24 20:08:4932 DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override;
[email protected]586871b2014-07-22 17:05:1133
avi1023d012015-12-25 02:39:1434 int64_t TraceId() const override;
[email protected]dab0a422014-08-13 16:09:4635
[email protected]586871b2014-07-22 17:05:1136 private:
[email protected]586871b2014-07-22 17:05:1137 scoped_refptr<IPC::SyncMessageFilter> message_sender_;
38 scoped_refptr<content::FrameSwapMessageQueue> message_queue_;
39 int source_frame_number_;
[email protected]586871b2014-07-22 17:05:1140};
41
42} // namespace content
43
Sadrul Habib Chowdhury31c98712018-12-11 04:15:1344#endif // CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_