From 39b7b06790a776ee2247f391b1b2e3af1a335503 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Wed, 4 Feb 2009 03:15:58 +0000 Subject: Make it easier/less work/less error-prone to create new IPC channel types (i.e. renderer/plugin).Instead of having each message file include the internal one several times with different ifdefs, move that logic to ipc_message_macros.h. Also make the message class starting IDs come from an enum to ensure we don't use a value twice. I simplified the logging code a bit so we don't need X_messages.cc files.Clean up places that we were doing manual packing/unpacking. Most of this was in the automation code. I added a few new template functions to make it convenient to read the parameters from a message, and updated the code to use them.I also removed unnecessary includes of render/plugin_messages.h from headers to speed up compiling.I moved the traits of IPC structs beside the struct definition to make it more apparent what's going on, so we avoid people modifying the struct and forgetting to update the traits.Amit: please look at chrome/test/automation/tab_proxy.ccMarc-Antoine: chrome/browser/printing/*Matt: the rest Review URL: http://codereview.chromium.org/20015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9123 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_widget.h | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'chrome/renderer/render_widget.h') diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h index df193bd..8e37b83 100644 --- a/chrome/renderer/render_widget.h +++ b/chrome/renderer/render_widget.h @@ -12,8 +12,8 @@ #include "base/gfx/rect.h" #include "base/gfx/size.h" #include "base/ref_counted.h" +#include "base/shared_memory.h" #include "chrome/common/ipc_channel.h" -#include "chrome/common/render_messages.h" #include "skia/ext/platform_canvas.h" #include "webkit/glue/webwidget_delegate.h" @@ -144,25 +144,11 @@ class RenderWidget : public IPC::Channel::Listener, return current_scroll_buf_ != NULL; } - bool next_paint_is_resize_ack() const { - return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_); - } - - bool next_paint_is_restore_ack() const { - return ViewHostMsg_PaintRect_Flags::is_restore_ack(next_paint_flags_); - } - - void set_next_paint_is_resize_ack() { - next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESIZE_ACK; - } - - void set_next_paint_is_restore_ack() { - next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESTORE_ACK; - } - - void set_next_paint_is_repaint_ack() { - next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_REPAINT_ACK; - } + bool next_paint_is_resize_ack() const; + bool next_paint_is_restore_ack() const; + void set_next_paint_is_resize_ack(); + void set_next_paint_is_restore_ack(); + void set_next_paint_is_repaint_ack(); // Called when a renderer process moves an input focus or updates the // position of its caret. -- cgit v1.1