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

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: 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/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index a4f988db475f838a0c5e5fb4706be394af886bdb..efc9544688e161e17ec9c521d8190c5ff6d13c8a 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -9,6 +9,7 @@
#include <map>
#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"
@@ -20,6 +21,8 @@
#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 "content/renderer/message_delivery_policy_lookup.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
#include "third_party/WebKit/public/platform/WebRect.h"
@@ -66,6 +69,7 @@ class Range;
namespace content {
class ExternalPopupMenu;
+class FrameSwapMessageQueue;
class PepperPluginInstanceImpl;
class RenderFrameImpl;
class RenderWidgetCompositor;
@@ -176,6 +180,18 @@ class CONTENT_EXPORT RenderWidget
// Notifies about a compositor frame commit operation having finished.
virtual void DidCommitCompositorFrame();
+ // If the RenderWidget doesn't need a commit this is equivalent to Send,
+ // otherwise this will make sure |msg| is delivered with a frame swap
+ // coresponding to the commit that is about to occur.
+ //
+ // |msg| message to send, ownership of |msg| is transferred.
+ void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
+
+ template <typename T>
+ void QueueMessage(T* msg) {
+ QueueMessage(msg, MessageDeliveryPolicyLookup<T>::policy);
+ }
+
// Handle common setup/teardown for handling IME events.
void StartHandlingImeEvent();
void FinishHandlingImeEvent();
@@ -687,6 +703,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_;
// A list of swapped out RenderFrames that need to be notified

Powered by Google App Engine
This is Rietveld 408576698