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

Unified Diff: content/renderer/render_widget.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/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 97fbb8d4ae8d445e192077d696d4131e8506de2a..de1b1a417bb145abaece28ce283ad5e69c52537d 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;
@@ -193,6 +200,18 @@ 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|.
+ // This mechanism is not a drop-in replacement for IPC: messages sent this way
+ // will not be automatically available to BrowserMessageFilter, for example.
+ // FIFO ordering is preserved between messages enqueued with the same
+ // |policy|, the ordering between messages enqueued for different policies is
+ // undefined.
+ //
+ // |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 +438,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();
@@ -688,6 +717,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

Powered by Google App Engine
This is Rietveld 408576698