Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 5 #ifndef CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ | |
| 6 #define CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ | |
|
mkosiba (inactive)
2014/06/24 18:29:54
should this go under renderer/gpu ?
piman
2014/06/24 19:35:53
Yeah, good idea.
mkosiba (inactive)
2014/06/25 18:40:38
Done.
| |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "cc/base/swap_promise.h" | |
| 11 | |
| 12 namespace IPC { | |
| 13 class SyncMessageFilter; | |
| 14 } | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 class FrameSwapMessageQueue; | |
| 19 | |
| 20 class QueueMessageSwapPromise : public cc::SwapPromise { | |
| 21 public: | |
| 22 QueueMessageSwapPromise( | |
| 23 scoped_refptr<IPC::SyncMessageFilter> message_sender, | |
| 24 scoped_refptr<FrameSwapMessageQueue> message_queue, | |
| 25 int source_frame_number); | |
| 26 | |
| 27 virtual ~QueueMessageSwapPromise(); | |
| 28 | |
| 29 virtual void DidSwap(cc::CompositorFrameMetadata* metadata) OVERRIDE; | |
| 30 | |
| 31 virtual void DidNotSwap(DidNotSwapReason reason) OVERRIDE; | |
| 32 | |
| 33 private: | |
| 34 void PromiseCompleted(); | |
| 35 | |
| 36 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | |
| 37 scoped_refptr<content::FrameSwapMessageQueue> message_queue_; | |
| 38 int source_frame_number_; | |
| 39 #ifndef NDEBUG | |
| 40 bool completed_; | |
| 41 #endif | |
| 42 }; | |
| 43 | |
| 44 } // namespace content | |
| 45 | |
| 46 #endif // CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_ | |
| OLD | NEW |