Index: content/renderer/render_widget.h |
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h |
index 7c8e94835804bf7b316ebd20dac286080e320ee0..87c4eede09cc61592a13a1acfa252b6cfb70c699 100644 |
--- a/content/renderer/render_widget.h |
+++ b/content/renderer/render_widget.h |
@@ -10,6 +10,7 @@ |
#include "base/auto_reset.h" |
#include "base/basictypes.h" |
+#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
@@ -21,6 +22,7 @@ |
#include "content/common/cursors/webcursor.h" |
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
#include "content/common/input/synthetic_gesture_params.h" |
+#include "content/renderer/message_delivery_policy.h" |
#include "ipc/ipc_listener.h" |
#include "ipc/ipc_sender.h" |
#include "third_party/WebKit/public/platform/WebRect.h" |
@@ -49,6 +51,7 @@ class ViewHostMsg_UpdateRect; |
namespace IPC { |
class SyncMessage; |
+class SyncMessageFilter; |
} |
namespace blink { |
@@ -59,7 +62,10 @@ class WebMouseEvent; |
class WebTouchEvent; |
} |
-namespace cc { class OutputSurface; } |
+namespace cc { |
+class OutputSurface; |
+class SwapPromise; |
+} |
namespace gfx { |
class Range; |
@@ -67,6 +73,7 @@ class Range; |
namespace content { |
class ExternalPopupMenu; |
+class FrameSwapMessageQueue; |
class PepperPluginInstanceImpl; |
class RenderFrameImpl; |
class RenderFrameProxy; |
@@ -192,6 +199,13 @@ class CONTENT_EXPORT RenderWidget |
// Notifies about a compositor frame commit operation having finished. |
virtual void DidCommitCompositorFrame(); |
+ // Deliveres |message| together with compositor state change updates. The |
+ // exact behavior depends on |policy|. |
+ // |
+ // |msg| message to send, ownership of |msg| is transferred. |
+ // |policy| see the comment on MessageDeliveryPolicy. |
+ void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); |
+ |
// Handle common setup/teardown for handling IME events. |
void StartHandlingImeEvent(); |
void FinishHandlingImeEvent(); |
@@ -419,6 +433,16 @@ class CONTENT_EXPORT RenderWidget |
void set_next_paint_is_resize_ack(); |
void set_next_paint_is_repaint_ack(); |
+ // QueueMessage implementation extracted into a static method for easy |
+ // testing. |
+ static scoped_ptr<cc::SwapPromise> QueueMessageImpl( |
+ IPC::Message* msg, |
+ MessageDeliveryPolicy policy, |
+ FrameSwapMessageQueue* frame_swap_message_queue, |
+ scoped_refptr<IPC::SyncMessageFilter> sync_message_filter, |
+ bool commit_requested, |
+ int source_frame_number); |
+ |
// Override point to obtain that the current input method state and caret |
// position. |
virtual ui::TextInputType GetTextInputType(); |
@@ -691,6 +715,7 @@ class CONTENT_EXPORT RenderWidget |
gfx::Point popup_screen_origin_for_emulation_; |
float popup_origin_scale_for_emulation_; |
+ scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
scoped_ptr<ResizingModeSelector> resizing_mode_selector_; |
// Lists of RenderFrameProxy objects that need to be notified of |