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

Unified Diff: content/renderer/message_delivery_policy_lookup.h

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/message_delivery_policy_lookup.h
diff --git a/content/renderer/message_delivery_policy_lookup.h b/content/renderer/message_delivery_policy_lookup.h
new file mode 100644
index 0000000000000000000000000000000000000000..f200aea92e56600380f0aac3344c5335a7c1e408
--- /dev/null
+++ b/content/renderer/message_delivery_policy_lookup.h
@@ -0,0 +1,31 @@
+// 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.
+
+#include "content/renderer/message_delivery_policy.h"
+
+#ifndef CONTENT_RENDERER_MESSAGE_DELIVERY_POLICY_LOOKUP_H_
+#define CONTENT_RENDERER_MESSAGE_DELIVERY_POLICY_LOOKUP_H_
+
+class FrameHostMsg_DidFirstVisuallyNonEmptyPaint;
+
+namespace content {
+
+// Specialize this template as below to define what the policy should be for a
+// given IPC message.
+// template<> struct MessageDeliveryPolicyLookup<Msg_Whatever> {
+// static const MessageDeliveryPolicy::Policy policy =
+// MessageDeliveryPolicy::WITH_NEXT_SWAP;
+// }
+template <typename T>
+struct MessageDeliveryPolicyLookup {};
mkosiba (inactive) 2014/05/22 17:40:24 It's not ideal (especially the bit where you forwa
piman 2014/05/22 23:32:01 It seems overkill to me. There's going to be maybe
mkosiba (inactive) 2014/05/23 15:50:38 Done.
+
+template <>
+struct MessageDeliveryPolicyLookup<FrameHostMsg_DidFirstVisuallyNonEmptyPaint> {
+ static const MessageDeliveryPolicy policy =
+ MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MESSAGE_DELIVERY_POLICY_LOOKUP_H_

Powered by Google App Engine
This is Rietveld 408576698