Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: content/renderer/gpu/queue_message_swap_promise.h

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable browsertest for android for realz this time Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/gpu/queue_message_swap_promise.h
diff --git a/content/renderer/gpu/queue_message_swap_promise.h b/content/renderer/gpu/queue_message_swap_promise.h
new file mode 100644
index 0000000000000000000000000000000000000000..20a519bfe4d8a68fb7fb09c5e3e5118263ebb267
--- /dev/null
+++ b/content/renderer/gpu/queue_message_swap_promise.h
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_
+#define CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/swap_promise.h"
+
+namespace IPC {
+class SyncMessageFilter;
+}
+
+namespace content {
+
+class FrameSwapMessageQueue;
+
+class QueueMessageSwapPromise : public cc::SwapPromise {
+ public:
+ QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender,
+ scoped_refptr<FrameSwapMessageQueue> message_queue,
+ int source_frame_number);
+
+ virtual ~QueueMessageSwapPromise();
+
+ virtual void DidSwap(cc::CompositorFrameMetadata* metadata) OVERRIDE;
+
+ virtual void DidNotSwap(DidNotSwapReason reason) OVERRIDE;
+
+ private:
+ void PromiseCompleted();
+
+ scoped_refptr<IPC::SyncMessageFilter> message_sender_;
+ scoped_refptr<content::FrameSwapMessageQueue> message_queue_;
+ int source_frame_number_;
+#if DCHECK_IS_ON
+ bool completed_;
+#endif
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_QUEUE_MESSAGE_SWAP_PROMISE_H_

Powered by Google App Engine
This is Rietveld 408576698