[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 1 | // 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 Chowdhury | 31c9871 | 2018-12-11 04:15:13 | [diff] [blame] | 5 | #ifndef CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ |
6 | #define CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ | ||||
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 7 | |
avi | 1023d01 | 2015-12-25 02:39:14 | [diff] [blame] | 8 | #include <stdint.h> |
9 | |||||
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 10 | #include "base/memory/ref_counted.h" |
danakj | ba65a091 | 2017-09-21 16:38:42 | [diff] [blame] | 11 | #include "cc/trees/swap_promise.h" |
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 12 | |
13 | namespace IPC { | ||||
14 | class SyncMessageFilter; | ||||
15 | } | ||||
16 | |||||
17 | namespace content { | ||||
18 | |||||
19 | class FrameSwapMessageQueue; | ||||
20 | |||||
21 | class 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 | |||||
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 27 | ~QueueMessageSwapPromise() override; |
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 28 | |
tobiasjs | 93d46484 | 2015-05-15 17:52:44 | [diff] [blame] | 29 | void DidActivate() override; |
Sadrul Habib Chowdhury | 2485621 | 2018-05-25 21:38:43 | [diff] [blame] | 30 | void WillSwap(viz::CompositorFrameMetadata* metadata) override; |
samans | e7345c8 | 2016-12-16 02:51:16 | [diff] [blame] | 31 | void DidSwap() override; |
Bo Liu | def993a | 2019-04-24 20:08:49 | [diff] [blame] | 32 | DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override; |
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 33 | |
avi | 1023d01 | 2015-12-25 02:39:14 | [diff] [blame] | 34 | int64_t TraceId() const override; |
[email protected] | dab0a42 | 2014-08-13 16:09:46 | [diff] [blame] | 35 | |
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 36 | private: |
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 37 | scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
38 | scoped_refptr<content::FrameSwapMessageQueue> message_queue_; | ||||
39 | int source_frame_number_; | ||||
[email protected] | 586871b | 2014-07-22 17:05:11 | [diff] [blame] | 40 | }; |
41 | |||||
42 | } // namespace content | ||||
43 | |||||
Sadrul Habib Chowdhury | 31c9871 | 2018-12-11 04:15:13 | [diff] [blame] | 44 | #endif // CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ |