summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:24:54 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:24:54 +0000
commit0cfe5dae9265f8d3be8648e33421c7c76cb31b4e (patch)
treee66f9a09a25449285587c1734aeeef958e8744b0
parent06e3320d99ac84f65837749d579b4768e8d071f7 (diff)
downloadchromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.zip
chromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.tar.gz
chromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.tar.bz2
Completely revert all my IPC work to see if this was what regressed the page cycler.
BUG=51411,52103 TEST=page cycler Review URL: http://codereview.chromium.org/3170020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56272 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/tuple.h264
-rw-r--r--chrome/browser/extensions/extension_messages_unittest.cc1
-rw-r--r--chrome/browser/importer/firefox_importer_unittest_utils_mac.cc7
-rw-r--r--chrome/browser/importer/importer_messages.cc11
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc1
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter_win.cc1
-rw-r--r--chrome/browser/renderer_host/sync_resource_handler.cc1
-rw-r--r--chrome/browser/visitedlink_event_listener.cc1
-rw-r--r--chrome/chrome.gyp1
-rw-r--r--chrome/chrome_browser.gypi7
-rw-r--r--chrome/chrome_common.gypi17
-rw-r--r--chrome/common/common_param_traits.cc39
-rw-r--r--chrome/common/common_param_traits.h45
-rw-r--r--chrome/common/devtools_messages.cc9
-rw-r--r--chrome/common/gpu_messages.cc9
-rw-r--r--chrome/common/nacl_messages.cc9
-rw-r--r--chrome/common/nacl_messages_internal.h1
-rw-r--r--chrome/common/plugin_messages.cc11
-rw-r--r--chrome/common/render_messages.cc923
-rw-r--r--chrome/common/render_messages.h882
-rw-r--r--chrome/common/render_messages_internal.h22
-rw-r--r--chrome/common/render_messages_unittest.cc2
-rw-r--r--chrome/common/resource_dispatcher.cc1
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc1
-rw-r--r--chrome/common/service_messages.cc9
-rw-r--r--chrome/common/utility_messages.cc9
-rw-r--r--chrome/common/webkit_param_traits.cc170
-rw-r--r--chrome/common/webkit_param_traits.h154
-rw-r--r--chrome/common/worker_messages.cc9
-rw-r--r--chrome/plugin/plugin_thread.cc1
-rw-r--r--chrome/renderer/blocked_plugin.cc1
-rw-r--r--chrome/renderer/indexed_db_dispatcher.cc1
-rw-r--r--chrome/renderer/pepper_devices.cc2
-rw-r--r--chrome/renderer/render_thread.cc1
-rw-r--r--chrome/renderer/render_view.cc3
-rw-r--r--chrome/renderer/render_widget.cc2
-rw-r--r--chrome/renderer/renderer_webcookiejar_impl.cc1
-rw-r--r--chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc1
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc1
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.h1
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc1
-rw-r--r--chrome/test/automation/automation_messages.cc9
-rw-r--r--ipc/ipc_fuzzing_tests.cc1
-rw-r--r--ipc/ipc_message_impl_macros.h674
-rw-r--r--ipc/ipc_message_macros.h633
-rw-r--r--ipc/ipc_message_utils.cc127
-rw-r--r--ipc/ipc_message_utils.h291
-rw-r--r--ipc/ipc_message_utils_impl.h60
-rw-r--r--ipc/ipc_send_fds_test.cc1
-rw-r--r--ipc/ipc_sync_channel_unittest.cc4
-rw-r--r--ipc/sync_socket_unittest.cc1
-rw-r--r--printing/pdf_ps_metafile_cairo.cc5
-rw-r--r--printing/pdf_ps_metafile_cairo.h2
56 files changed, 1556 insertions, 2890 deletions
diff --git a/base/tuple.h b/base/tuple.h
index b67d924..bcd2ad4 100644
--- a/base/tuple.h
+++ b/base/tuple.h
@@ -52,9 +52,6 @@ struct TupleTraits<P&> {
typedef P& ParamType;
};
-template <class P>
-struct TupleTypes { };
-
// Tuple -----------------------------------------------------------------------
//
// This set of classes is useful for bundling 0 or more heterogeneous data types
@@ -79,6 +76,9 @@ template <class A>
struct Tuple1 {
public:
typedef A TypeA;
+ typedef Tuple1<typename TupleTraits<A>::ValueType> ValueTuple;
+ typedef Tuple1<typename TupleTraits<A>::RefType> RefTuple;
+ typedef Tuple1<typename TupleTraits<A>::ParamType> ParamTuple;
Tuple1() {}
explicit Tuple1(typename TupleTraits<A>::ParamType a) : a(a) {}
@@ -91,6 +91,12 @@ struct Tuple2 {
public:
typedef A TypeA;
typedef B TypeB;
+ typedef Tuple2<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType> ValueTuple;
+ typedef Tuple2<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType> RefTuple;
+ typedef Tuple2<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType> ParamTuple;
Tuple2() {}
Tuple2(typename TupleTraits<A>::ParamType a,
@@ -108,6 +114,15 @@ struct Tuple3 {
typedef A TypeA;
typedef B TypeB;
typedef C TypeC;
+ typedef Tuple3<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType> ValueTuple;
+ typedef Tuple3<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType> RefTuple;
+ typedef Tuple3<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType> ParamTuple;
Tuple3() {}
Tuple3(typename TupleTraits<A>::ParamType a,
@@ -128,6 +143,18 @@ struct Tuple4 {
typedef B TypeB;
typedef C TypeC;
typedef D TypeD;
+ typedef Tuple4<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType,
+ typename TupleTraits<D>::ValueType> ValueTuple;
+ typedef Tuple4<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType,
+ typename TupleTraits<D>::RefType> RefTuple;
+ typedef Tuple4<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType,
+ typename TupleTraits<D>::ParamType> ParamTuple;
Tuple4() {}
Tuple4(typename TupleTraits<A>::ParamType a,
@@ -151,6 +178,21 @@ struct Tuple5 {
typedef C TypeC;
typedef D TypeD;
typedef E TypeE;
+ typedef Tuple5<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType,
+ typename TupleTraits<D>::ValueType,
+ typename TupleTraits<E>::ValueType> ValueTuple;
+ typedef Tuple5<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType,
+ typename TupleTraits<D>::RefType,
+ typename TupleTraits<E>::RefType> RefTuple;
+ typedef Tuple5<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType,
+ typename TupleTraits<D>::ParamType,
+ typename TupleTraits<E>::ParamType> ParamTuple;
Tuple5() {}
Tuple5(typename TupleTraits<A>::ParamType a,
@@ -177,6 +219,24 @@ struct Tuple6 {
typedef D TypeD;
typedef E TypeE;
typedef F TypeF;
+ typedef Tuple6<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType,
+ typename TupleTraits<D>::ValueType,
+ typename TupleTraits<E>::ValueType,
+ typename TupleTraits<F>::ValueType> ValueTuple;
+ typedef Tuple6<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType,
+ typename TupleTraits<D>::RefType,
+ typename TupleTraits<E>::RefType,
+ typename TupleTraits<F>::RefType> RefTuple;
+ typedef Tuple6<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType,
+ typename TupleTraits<D>::ParamType,
+ typename TupleTraits<E>::ParamType,
+ typename TupleTraits<F>::ParamType> ParamTuple;
Tuple6() {}
Tuple6(typename TupleTraits<A>::ParamType a,
@@ -206,6 +266,27 @@ struct Tuple7 {
typedef E TypeE;
typedef F TypeF;
typedef G TypeG;
+ typedef Tuple7<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType,
+ typename TupleTraits<D>::ValueType,
+ typename TupleTraits<E>::ValueType,
+ typename TupleTraits<F>::ValueType,
+ typename TupleTraits<G>::ValueType> ValueTuple;
+ typedef Tuple7<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType,
+ typename TupleTraits<D>::RefType,
+ typename TupleTraits<E>::RefType,
+ typename TupleTraits<F>::RefType,
+ typename TupleTraits<G>::RefType> RefTuple;
+ typedef Tuple7<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType,
+ typename TupleTraits<D>::ParamType,
+ typename TupleTraits<E>::ParamType,
+ typename TupleTraits<F>::ParamType,
+ typename TupleTraits<G>::ParamType> ParamTuple;
Tuple7() {}
Tuple7(typename TupleTraits<A>::ParamType a,
@@ -239,6 +320,30 @@ struct Tuple8 {
typedef F TypeF;
typedef G TypeG;
typedef H TypeH;
+ typedef Tuple8<typename TupleTraits<A>::ValueType,
+ typename TupleTraits<B>::ValueType,
+ typename TupleTraits<C>::ValueType,
+ typename TupleTraits<D>::ValueType,
+ typename TupleTraits<E>::ValueType,
+ typename TupleTraits<F>::ValueType,
+ typename TupleTraits<G>::ValueType,
+ typename TupleTraits<H>::ValueType> ValueTuple;
+ typedef Tuple8<typename TupleTraits<A>::RefType,
+ typename TupleTraits<B>::RefType,
+ typename TupleTraits<C>::RefType,
+ typename TupleTraits<D>::RefType,
+ typename TupleTraits<E>::RefType,
+ typename TupleTraits<F>::RefType,
+ typename TupleTraits<G>::RefType,
+ typename TupleTraits<H>::RefType> RefTuple;
+ typedef Tuple8<typename TupleTraits<A>::ParamType,
+ typename TupleTraits<B>::ParamType,
+ typename TupleTraits<C>::ParamType,
+ typename TupleTraits<D>::ParamType,
+ typename TupleTraits<E>::ParamType,
+ typename TupleTraits<F>::ParamType,
+ typename TupleTraits<G>::ParamType,
+ typename TupleTraits<H>::ParamType> ParamTuple;
Tuple8() {}
Tuple8(typename TupleTraits<A>::ParamType a,
@@ -262,159 +367,6 @@ struct Tuple8 {
H h;
};
-// Tuple types ----------------------------------------------------------------
-//
-// Allows for selection of ValueTuple/RefTuple/ParamTuple without needing the
-// definitions of class types the tuple takes as parameters.
-
-template <>
-struct TupleTypes< Tuple0 > {
- typedef Tuple0 ValueTuple;
- typedef Tuple0 RefTuple;
- typedef Tuple0 ParamTuple;
-};
-
-template <class A>
-struct TupleTypes< Tuple1<A> > {
- typedef Tuple1<typename TupleTraits<A>::ValueType> ValueTuple;
- typedef Tuple1<typename TupleTraits<A>::RefType> RefTuple;
- typedef Tuple1<typename TupleTraits<A>::ParamType> ParamTuple;
-};
-
-template <class A, class B>
-struct TupleTypes< Tuple2<A, B> > {
- typedef Tuple2<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType> ValueTuple;
-typedef Tuple2<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType> RefTuple;
- typedef Tuple2<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C>
-struct TupleTypes< Tuple3<A, B, C> > {
- typedef Tuple3<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType> ValueTuple;
-typedef Tuple3<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType> RefTuple;
- typedef Tuple3<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C, class D>
-struct TupleTypes< Tuple4<A, B, C, D> > {
- typedef Tuple4<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType,
- typename TupleTraits<D>::ValueType> ValueTuple;
-typedef Tuple4<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType,
- typename TupleTraits<D>::RefType> RefTuple;
- typedef Tuple4<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType,
- typename TupleTraits<D>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C, class D, class E>
-struct TupleTypes< Tuple5<A, B, C, D, E> > {
- typedef Tuple5<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType,
- typename TupleTraits<D>::ValueType,
- typename TupleTraits<E>::ValueType> ValueTuple;
-typedef Tuple5<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType,
- typename TupleTraits<D>::RefType,
- typename TupleTraits<E>::RefType> RefTuple;
- typedef Tuple5<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType,
- typename TupleTraits<D>::ParamType,
- typename TupleTraits<E>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C, class D, class E, class F>
-struct TupleTypes< Tuple6<A, B, C, D, E, F> > {
- typedef Tuple6<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType,
- typename TupleTraits<D>::ValueType,
- typename TupleTraits<E>::ValueType,
- typename TupleTraits<F>::ValueType> ValueTuple;
-typedef Tuple6<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType,
- typename TupleTraits<D>::RefType,
- typename TupleTraits<E>::RefType,
- typename TupleTraits<F>::RefType> RefTuple;
- typedef Tuple6<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType,
- typename TupleTraits<D>::ParamType,
- typename TupleTraits<E>::ParamType,
- typename TupleTraits<F>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C, class D, class E, class F, class G>
-struct TupleTypes< Tuple7<A, B, C, D, E, F, G> > {
- typedef Tuple7<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType,
- typename TupleTraits<D>::ValueType,
- typename TupleTraits<E>::ValueType,
- typename TupleTraits<F>::ValueType,
- typename TupleTraits<G>::ValueType> ValueTuple;
-typedef Tuple7<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType,
- typename TupleTraits<D>::RefType,
- typename TupleTraits<E>::RefType,
- typename TupleTraits<F>::RefType,
- typename TupleTraits<G>::RefType> RefTuple;
- typedef Tuple7<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType,
- typename TupleTraits<D>::ParamType,
- typename TupleTraits<E>::ParamType,
- typename TupleTraits<F>::ParamType,
- typename TupleTraits<G>::ParamType> ParamTuple;
-};
-
-template <class A, class B, class C, class D, class E, class F, class G,
- class H>
-struct TupleTypes< Tuple8<A, B, C, D, E, F, G, H> > {
- typedef Tuple8<typename TupleTraits<A>::ValueType,
- typename TupleTraits<B>::ValueType,
- typename TupleTraits<C>::ValueType,
- typename TupleTraits<D>::ValueType,
- typename TupleTraits<E>::ValueType,
- typename TupleTraits<F>::ValueType,
- typename TupleTraits<G>::ValueType,
- typename TupleTraits<H>::ValueType> ValueTuple;
-typedef Tuple8<typename TupleTraits<A>::RefType,
- typename TupleTraits<B>::RefType,
- typename TupleTraits<C>::RefType,
- typename TupleTraits<D>::RefType,
- typename TupleTraits<E>::RefType,
- typename TupleTraits<F>::RefType,
- typename TupleTraits<G>::RefType,
- typename TupleTraits<H>::RefType> RefTuple;
- typedef Tuple8<typename TupleTraits<A>::ParamType,
- typename TupleTraits<B>::ParamType,
- typename TupleTraits<C>::ParamType,
- typename TupleTraits<D>::ParamType,
- typename TupleTraits<E>::ParamType,
- typename TupleTraits<F>::ParamType,
- typename TupleTraits<G>::ParamType,
- typename TupleTraits<H>::ParamType> ParamTuple;
-};
-
// Tuple creators -------------------------------------------------------------
//
// Helper functions for constructing tuples while inferring the template
diff --git a/chrome/browser/extensions/extension_messages_unittest.cc b/chrome/browser/extensions/extension_messages_unittest.cc
index 3b3c273..b90e92f 100644
--- a/chrome/browser/extensions/extension_messages_unittest.cc
+++ b/chrome/browser/extensions/extension_messages_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/values.h"
#include "chrome/browser/extensions/extension_message_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/extensions/event_bindings.h"
diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
index 859811e..c20940f4 100644
--- a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
+++ b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
@@ -16,16 +16,11 @@
#include "ipc/ipc_switches.h"
#include "testing/multiprocess_func_list.h"
-// Declaration of IPC Messages used for this test.
+// Definition of IPC Messages used for this test.
#define MESSAGES_INTERNAL_FILE \
"chrome/browser/importer/firefox_importer_unittest_messages_internal.h"
#include "ipc/ipc_message_macros.h"
-// Definition of IPC Messages used for this test.
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/browser/importer/firefox_importer_unittest_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
-
namespace {
// Name of IPC Channel to use for Server<-> Child Communications.
diff --git a/chrome/browser/importer/importer_messages.cc b/chrome/browser/importer/importer_messages.cc
deleted file mode 100644
index d20452a..0000000
--- a/chrome/browser/importer/importer_messages.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2010 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 "chrome/browser/importer/importer_messages.h"
-
-#include "base/values.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/browser/importer/importer_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index e2a7fba..a9af09a 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -18,7 +18,6 @@
#include "app/app_switches.h"
#include "base/command_line.h"
#include "base/field_trial.h"
-#include "base/histogram.h"
#include "base/logging.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 26e7217..baa7de7 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -44,8 +44,6 @@
#include "net/base/net_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
-#include "webkit/glue/context_menu.h"
-#include "webkit/glue/dom_operations.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form_dom_manager.h"
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 315dd16..3c553d4 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -22,7 +22,6 @@
#include "app/x11_util.h"
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "base/task.h"
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 70e75d4..1a489de 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -85,10 +85,8 @@
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h"
-#include "webkit/glue/context_menu.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/webcookie.h"
#include "webkit/glue/webkit_glue.h"
using net::CookieStore;
diff --git a/chrome/browser/renderer_host/resource_message_filter_win.cc b/chrome/browser/renderer_host/resource_message_filter_win.cc
index 4a8c46e..aa53422 100644
--- a/chrome/browser/renderer_host/resource_message_filter_win.cc
+++ b/chrome/browser/renderer_host/resource_message_filter_win.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/render_messages.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h"
using WebKit::WebScreenInfo;
diff --git a/chrome/browser/renderer_host/sync_resource_handler.cc b/chrome/browser/renderer_host/sync_resource_handler.cc
index 86bc899..7e88754 100644
--- a/chrome/browser/renderer_host/sync_resource_handler.cc
+++ b/chrome/browser/renderer_host/sync_resource_handler.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "chrome/browser/renderer_host/sync_resource_handler.h"
-
#include "base/logging.h"
#include "chrome/common/render_messages.h"
#include "net/base/io_buffer.h"
diff --git a/chrome/browser/visitedlink_event_listener.cc b/chrome/browser/visitedlink_event_listener.cc
index ad43ba0..9003fcc 100644
--- a/chrome/browser/visitedlink_event_listener.cc
+++ b/chrome/browser/visitedlink_event_listener.cc
@@ -6,6 +6,7 @@
#include "base/shared_memory.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/common/render_messages.h"
using base::Time;
using base::TimeDelta;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index a68f235..c2aeb1d 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -1709,7 +1709,6 @@
'test/automation/automation_constants.h',
'test/automation/automation_handle_tracker.cc',
'test/automation/automation_handle_tracker.h',
- 'test/automation/automation_messages.cc',
'test/automation/automation_messages.h',
'test/automation/automation_messages_internal.h',
'test/automation/automation_proxy.cc',
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 168316b..04801a4 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1846,7 +1846,6 @@
'browser/importer/importer_data_types.h',
'browser/importer/importer_list.cc',
'browser/importer/importer_list.h',
- 'browser/importer/importer_messages.cc',
'browser/importer/importer_messages.h',
'browser/importer/importer_messages_internal.h',
'browser/importer/mork_reader.cc',
@@ -2966,12 +2965,6 @@
'browser/zygote_host_linux.cc',
'browser/zygote_main_linux.cc',
- # TODO(erg): http://crbug.com/51409 These files are also specified as
- # part of the automation project, but we need these definitions here,
- # too, due to usage in our automation provider.
- 'test/automation/automation_messages.cc',
- 'test/automation/automation_messages.h',
-
# These files are generated by GRIT.
'<(grit_out_dir)/grit/bookmark_manager_resources_map.cc',
'<(grit_out_dir)/grit/shared_resources_map.cc',
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 3c6eb5a..68d1414 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -49,7 +49,6 @@
'common/content_settings_types.h',
'common/debug_flags.cc',
'common/debug_flags.h',
- 'common/devtools_messages.cc',
'common/devtools_messages.h',
'common/devtools_messages_internal.h',
'common/font_descriptor_mac.h',
@@ -58,7 +57,6 @@
'common/geoposition.h',
'common/gpu_info.h',
'common/gpu_info.cc',
- 'common/gpu_messages.cc',
'common/gpu_messages.h',
'common/gpu_messages_internal.h',
'common/gpu_video_common.cc',
@@ -74,10 +72,9 @@
'common/metrics_helpers.h',
'common/nacl_cmd_line.cc',
'common/nacl_cmd_line.h',
- 'common/nacl_messages.cc',
'common/nacl_messages.h',
- 'common/nacl_messages_internal.h',
'common/nacl_types.h',
+ 'common/nacl_messages_internal.h',
'common/notification_details.cc',
'common/notification_details.h',
'common/notification_observer.h',
@@ -251,10 +248,8 @@
'common/pepper_plugin_registry.h',
'common/plugin_carbon_interpose_constants_mac.h',
'common/plugin_carbon_interpose_constants_mac.cc',
- 'common/plugin_messages.cc',
'common/plugin_messages.h',
'common/plugin_messages_internal.h',
- 'common/render_messages.cc',
'common/render_messages.h',
'common/render_messages_internal.h',
'common/renderer_preferences.h',
@@ -262,12 +257,11 @@
'common/resource_dispatcher.h',
'common/security_filter_peer.cc',
'common/security_filter_peer.h',
- 'common/service_messages.cc',
'common/service_messages.h',
'common/services_messages_internal.h',
- 'common/service_process_type.h',
- 'common/service_process_util.cc',
- 'common/service_process_util.h',
+ 'common/service_process_type.h',
+ 'common/service_process_util.cc',
+ 'common/service_process_util.h',
'common/socket_stream_dispatcher.cc',
'common/socket_stream_dispatcher.h',
'common/spellcheck_common.cc',
@@ -280,7 +274,6 @@
'common/thumbnail_score.h',
'common/url_constants.cc',
'common/url_constants.h',
- 'common/utility_messages.cc',
'common/utility_messages.h',
'common/utility_messages_internal.h',
'common/view_types.cc',
@@ -289,13 +282,11 @@
'common/visitedlink_common.h',
'common/web_database_observer_impl.cc',
'common/web_database_observer_impl.h',
- 'common/webkit_param_traits.cc',
'common/webkit_param_traits.h',
'common/webmessageportchannel_impl.cc',
'common/webmessageportchannel_impl.h',
'common/window_container_type.cc',
'common/window_container_type.h',
- 'common/worker_messages.cc',
'common/worker_messages.h',
'common/worker_messages_internal.h',
'common/worker_thread_ticker.cc',
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index d6eb2cc..e655435 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -407,45 +407,6 @@ void ParamTraits<Geoposition>::Log(const Geoposition& p, std::wstring* l) {
LogParam(p.error_code, l);
}
-void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.signon_realm);
- WriteParam(m, p.origin);
- WriteParam(m, p.action);
- WriteParam(m, p.submit_element);
- WriteParam(m, p.username_element);
- WriteParam(m, p.username_value);
- WriteParam(m, p.password_element);
- WriteParam(m, p.password_value);
- WriteParam(m, p.old_password_element);
- WriteParam(m, p.old_password_value);
- WriteParam(m, p.ssl_valid);
- WriteParam(m, p.preferred);
- WriteParam(m, p.blacklisted_by_user);
-}
-
-bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->signon_realm) &&
- ReadParam(m, iter, &p->origin) &&
- ReadParam(m, iter, &p->action) &&
- ReadParam(m, iter, &p->submit_element) &&
- ReadParam(m, iter, &p->username_element) &&
- ReadParam(m, iter, &p->username_value) &&
- ReadParam(m, iter, &p->password_element) &&
- ReadParam(m, iter, &p->password_value) &&
- ReadParam(m, iter, &p->old_password_element) &&
- ReadParam(m, iter, &p->old_password_value) &&
- ReadParam(m, iter, &p->ssl_valid) &&
- ReadParam(m, iter, &p->preferred) &&
- ReadParam(m, iter, &p->blacklisted_by_user);
-}
-void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<PasswordForm>");
-}
-
void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.from);
WriteParam(m, p.to);
diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h
index 4df6536..0ca6bed 100644
--- a/chrome/common/common_param_traits.h
+++ b/chrome/common/common_param_traits.h
@@ -23,6 +23,7 @@
#include "net/base/upload_data.h"
#include "net/url_request/url_request_status.h"
#include "printing/native_metafile.h"
+#include "webkit/glue/password_form.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/window_open_disposition.h"
@@ -33,7 +34,6 @@ class DictionaryValue;
class ListValue;
struct ThumbnailScore;
class URLRequestStatus;
-class WebCursor;
namespace gfx {
class Point;
@@ -210,7 +210,7 @@ struct ParamTraits<WebCursor> {
static void Write(Message* m, const param_type& p) {
p.Serialize(m);
}
- static bool Read(const Message* m, void** iter, param_type* r) {
+ static bool Read(const Message* m, void** iter, param_type* r) {
return r->Deserialize(m, iter);
}
static void Log(const param_type& p, std::wstring* l) {
@@ -368,16 +368,49 @@ struct ParamTraits<Geoposition::ErrorCode> {
template <>
struct ParamTraits<webkit_glue::PasswordForm> {
typedef webkit_glue::PasswordForm param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.signon_realm);
+ WriteParam(m, p.origin);
+ WriteParam(m, p.action);
+ WriteParam(m, p.submit_element);
+ WriteParam(m, p.username_element);
+ WriteParam(m, p.username_value);
+ WriteParam(m, p.password_element);
+ WriteParam(m, p.password_value);
+ WriteParam(m, p.old_password_element);
+ WriteParam(m, p.old_password_value);
+ WriteParam(m, p.ssl_valid);
+ WriteParam(m, p.preferred);
+ WriteParam(m, p.blacklisted_by_user);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->signon_realm) &&
+ ReadParam(m, iter, &p->origin) &&
+ ReadParam(m, iter, &p->action) &&
+ ReadParam(m, iter, &p->submit_element) &&
+ ReadParam(m, iter, &p->username_element) &&
+ ReadParam(m, iter, &p->username_value) &&
+ ReadParam(m, iter, &p->password_element) &&
+ ReadParam(m, iter, &p->password_value) &&
+ ReadParam(m, iter, &p->old_password_element) &&
+ ReadParam(m, iter, &p->old_password_value) &&
+ ReadParam(m, iter, &p->ssl_valid) &&
+ ReadParam(m, iter, &p->preferred) &&
+ ReadParam(m, iter, &p->blacklisted_by_user);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<PasswordForm>");
+ }
};
template <>
struct ParamTraits<printing::PageRange> {
typedef printing::PageRange param_type;
static void Write(Message* m, const param_type& p);
+
static bool Read(const Message* m, void** iter, param_type* r);
+
static void Log(const param_type& p, std::wstring* l);
};
@@ -385,7 +418,9 @@ template <>
struct ParamTraits<printing::NativeMetafile> {
typedef printing::NativeMetafile param_type;
static void Write(Message* m, const param_type& p);
+
static bool Read(const Message* m, void** iter, param_type* r);
+
static void Log(const param_type& p, std::wstring* l);
};
diff --git a/chrome/common/devtools_messages.cc b/chrome/common/devtools_messages.cc
deleted file mode 100644
index 8ea923e..0000000
--- a/chrome/common/devtools_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/devtools_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/devtools_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/gpu_messages.cc b/chrome/common/gpu_messages.cc
deleted file mode 100644
index 4ba5776..0000000
--- a/chrome/common/gpu_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/gpu_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/gpu_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/nacl_messages.cc b/chrome/common/nacl_messages.cc
deleted file mode 100644
index 291ed5a..0000000
--- a/chrome/common/nacl_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/nacl_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/nacl_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/nacl_messages_internal.h b/chrome/common/nacl_messages_internal.h
index e302118..8d95cc7 100644
--- a/chrome/common/nacl_messages_internal.h
+++ b/chrome/common/nacl_messages_internal.h
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/process.h"
#include "chrome/common/nacl_types.h"
#include "ipc/ipc_message_macros.h"
diff --git a/chrome/common/plugin_messages.cc b/chrome/common/plugin_messages.cc
deleted file mode 100644
index 3079dcc..0000000
--- a/chrome/common/plugin_messages.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/plugin_messages.h"
-
-#include "ipc/ipc_channel_handle.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/plugin_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
deleted file mode 100644
index e3aec79..0000000
--- a/chrome/common/render_messages.cc
+++ /dev/null
@@ -1,923 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/render_messages.h"
-
-#include "base/values.h"
-#include "chrome/common/edit_command.h"
-#include "chrome/common/extensions/extension_extent.h"
-#include "chrome/common/extensions/url_pattern.h"
-#include "chrome/common/indexed_db_key.h"
-#include "chrome/common/serialized_script_value.h"
-#include "chrome/common/thumbnail_score.h"
-#include "gfx/rect.h"
-#include "ipc/ipc_channel_handle.h"
-#include "net/http/http_response_headers.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
-#include "webkit/appcache/appcache_interfaces.h"
-#include "webkit/glue/context_menu.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/password_form_dom_manager.h"
-#include "webkit/glue/password_form.h"
-#include "webkit/glue/webaccessibility.h"
-#include "webkit/glue/webcookie.h"
-#include "webkit/glue/webcursor.h"
-#include "webkit/glue/webdropdata.h"
-#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/plugins/webplugininfo.h"
-#include "webkit/glue/dom_operations.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/render_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
-
-namespace IPC {
-
-void ParamTraits<ViewMsg_Navigate_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.page_id);
- WriteParam(m, p.pending_history_list_offset);
- WriteParam(m, p.current_history_list_offset);
- WriteParam(m, p.current_history_list_length);
- WriteParam(m, p.url);
- WriteParam(m, p.referrer);
- WriteParam(m, p.transition);
- WriteParam(m, p.state);
- WriteParam(m, p.navigation_type);
- WriteParam(m, p.request_time);
-}
-
-bool ParamTraits<ViewMsg_Navigate_Params>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->page_id) &&
- ReadParam(m, iter, &p->pending_history_list_offset) &&
- ReadParam(m, iter, &p->current_history_list_offset) &&
- ReadParam(m, iter, &p->current_history_list_length) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->referrer) &&
- ReadParam(m, iter, &p->transition) &&
- ReadParam(m, iter, &p->state) &&
- ReadParam(m, iter, &p->navigation_type) &&
- ReadParam(m, iter, &p->request_time);
-}
-
-void ParamTraits<ViewMsg_Navigate_Params>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.page_id, l);
- l->append(L", ");
- LogParam(p.url, l);
- l->append(L", ");
- LogParam(p.transition, l);
- l->append(L", ");
- LogParam(p.state, l);
- l->append(L", ");
- LogParam(p.navigation_type, l);
- l->append(L", ");
- LogParam(p.request_time, l);
- l->append(L")");
-}
-
-void ParamTraits<webkit_glue::FormField>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.label());
- WriteParam(m, p.name());
- WriteParam(m, p.value());
- WriteParam(m, p.form_control_type());
- WriteParam(m, p.size());
- WriteParam(m, p.option_strings());
-}
-
-bool ParamTraits<webkit_glue::FormField>::Read(const Message* m, void** iter,
- param_type* p) {
- string16 label, name, value, form_control_type;
- int size = 0;
- std::vector<string16> options;
- bool result = ReadParam(m, iter, &label);
- result = result && ReadParam(m, iter, &name);
- result = result && ReadParam(m, iter, &value);
- result = result && ReadParam(m, iter, &form_control_type);
- result = result && ReadParam(m, iter, &size);
- result = result && ReadParam(m, iter, &options);
- if (!result)
- return false;
-
- p->set_label(label);
- p->set_name(name);
- p->set_value(value);
- p->set_form_control_type(form_control_type);
- p->set_size(size);
- p->set_option_strings(options);
- return true;
-}
-
-void ParamTraits<webkit_glue::FormField>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<FormField>");
-}
-
-void ParamTraits<ContextMenuParams>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.media_type);
- WriteParam(m, p.x);
- WriteParam(m, p.y);
- WriteParam(m, p.link_url);
- WriteParam(m, p.unfiltered_link_url);
- WriteParam(m, p.src_url);
- WriteParam(m, p.is_image_blocked);
- WriteParam(m, p.page_url);
- WriteParam(m, p.frame_url);
- WriteParam(m, p.media_flags);
- WriteParam(m, p.selection_text);
- WriteParam(m, p.misspelled_word);
- WriteParam(m, p.dictionary_suggestions);
- WriteParam(m, p.spellcheck_enabled);
- WriteParam(m, p.is_editable);
-#if defined(OS_MACOSX)
- WriteParam(m, p.writing_direction_default);
- WriteParam(m, p.writing_direction_left_to_right);
- WriteParam(m, p.writing_direction_right_to_left);
-#endif // OS_MACOSX
- WriteParam(m, p.edit_flags);
- WriteParam(m, p.security_info);
- WriteParam(m, p.frame_charset);
- WriteParam(m, p.custom_items);
-}
-
-bool ParamTraits<ContextMenuParams>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->media_type) &&
- ReadParam(m, iter, &p->x) &&
- ReadParam(m, iter, &p->y) &&
- ReadParam(m, iter, &p->link_url) &&
- ReadParam(m, iter, &p->unfiltered_link_url) &&
- ReadParam(m, iter, &p->src_url) &&
- ReadParam(m, iter, &p->is_image_blocked) &&
- ReadParam(m, iter, &p->page_url) &&
- ReadParam(m, iter, &p->frame_url) &&
- ReadParam(m, iter, &p->media_flags) &&
- ReadParam(m, iter, &p->selection_text) &&
- ReadParam(m, iter, &p->misspelled_word) &&
- ReadParam(m, iter, &p->dictionary_suggestions) &&
- ReadParam(m, iter, &p->spellcheck_enabled) &&
- ReadParam(m, iter, &p->is_editable) &&
-#if defined(OS_MACOSX)
- ReadParam(m, iter, &p->writing_direction_default) &&
- ReadParam(m, iter, &p->writing_direction_left_to_right) &&
- ReadParam(m, iter, &p->writing_direction_right_to_left) &&
-#endif // OS_MACOSX
- ReadParam(m, iter, &p->edit_flags) &&
- ReadParam(m, iter, &p->security_info) &&
- ReadParam(m, iter, &p->frame_charset) &&
- ReadParam(m, iter, &p->custom_items);
-}
-
-void ParamTraits<ContextMenuParams>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<ContextMenuParams>");
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.bitmap);
- WriteParam(m, p.bitmap_rect);
- WriteParam(m, p.dx);
- WriteParam(m, p.dy);
- WriteParam(m, p.scroll_rect);
- WriteParam(m, p.copy_rects);
- WriteParam(m, p.view_size);
- WriteParam(m, p.plugin_window_moves);
- WriteParam(m, p.flags);
-}
-
-bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->bitmap) &&
- ReadParam(m, iter, &p->bitmap_rect) &&
- ReadParam(m, iter, &p->dx) &&
- ReadParam(m, iter, &p->dy) &&
- ReadParam(m, iter, &p->scroll_rect) &&
- ReadParam(m, iter, &p->copy_rects) &&
- ReadParam(m, iter, &p->view_size) &&
- ReadParam(m, iter, &p->plugin_window_moves) &&
- ReadParam(m, iter, &p->flags);
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.bitmap, l);
- l->append(L", ");
- LogParam(p.bitmap_rect, l);
- l->append(L", ");
- LogParam(p.dx, l);
- l->append(L", ");
- LogParam(p.dy, l);
- l->append(L", ");
- LogParam(p.scroll_rect, l);
- l->append(L", ");
- LogParam(p.copy_rects, l);
- l->append(L", ");
- LogParam(p.view_size, l);
- l->append(L", ");
- LogParam(p.plugin_window_moves, l);
- l->append(L", ");
- LogParam(p.flags, l);
- l->append(L")");
-}
-
-void ParamTraits<webkit_glue::WebPluginGeometry>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.window);
- WriteParam(m, p.window_rect);
- WriteParam(m, p.clip_rect);
- WriteParam(m, p.cutout_rects);
- WriteParam(m, p.rects_valid);
- WriteParam(m, p.visible);
-}
-
-bool ParamTraits<webkit_glue::WebPluginGeometry>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->window) &&
- ReadParam(m, iter, &p->window_rect) &&
- ReadParam(m, iter, &p->clip_rect) &&
- ReadParam(m, iter, &p->cutout_rects) &&
- ReadParam(m, iter, &p->rects_valid) &&
- ReadParam(m, iter, &p->visible);
-}
-
-void ParamTraits<webkit_glue::WebPluginGeometry>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.window, l);
- l->append(L", ");
- LogParam(p.window_rect, l);
- l->append(L", ");
- LogParam(p.clip_rect, l);
- l->append(L", ");
- LogParam(p.cutout_rects, l);
- l->append(L", ");
- LogParam(p.rects_valid, l);
- l->append(L", ");
- LogParam(p.visible, l);
- l->append(L")");
-}
-
-void ParamTraits<WebPluginMimeType>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.mime_type);
- WriteParam(m, p.file_extensions);
- WriteParam(m, p.description);
-}
-
-bool ParamTraits<WebPluginMimeType>::Read(const Message* m, void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->mime_type) &&
- ReadParam(m, iter, &r->file_extensions) &&
- ReadParam(m, iter, &r->description);
-}
-
-void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.mime_type, l);
- l->append(L", ");
- LogParam(p.file_extensions, l);
- l->append(L", ");
- LogParam(p.description, l);
- l->append(L")");
-}
-
-void ParamTraits<WebPluginInfo>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.path);
- WriteParam(m, p.version);
- WriteParam(m, p.desc);
- WriteParam(m, p.mime_types);
- WriteParam(m, p.enabled);
-}
-
-bool ParamTraits<WebPluginInfo>::Read(const Message* m, void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->name) &&
- ReadParam(m, iter, &r->path) &&
- ReadParam(m, iter, &r->version) &&
- ReadParam(m, iter, &r->desc) &&
- ReadParam(m, iter, &r->mime_types) &&
- ReadParam(m, iter, &r->enabled);
-}
-
-void ParamTraits<WebPluginInfo>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.name, l);
- l->append(L", ");
- l->append(L", ");
- LogParam(p.path, l);
- l->append(L", ");
- LogParam(p.version, l);
- l->append(L", ");
- LogParam(p.desc, l);
- l->append(L", ");
- LogParam(p.mime_types, l);
- l->append(L", ");
- LogParam(p.enabled, l);
- l->append(L")");
-}
-
-void ParamTraits<webkit_glue::PasswordFormFillData>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.basic_data);
- WriteParam(m, p.additional_logins);
- WriteParam(m, p.wait_for_username);
-}
-
-bool ParamTraits<webkit_glue::PasswordFormFillData>::Read(
- const Message* m, void** iter, param_type* r) {
- return
- ReadParam(m, iter, &r->basic_data) &&
- ReadParam(m, iter, &r->additional_logins) &&
- ReadParam(m, iter, &r->wait_for_username);
-}
-
-void ParamTraits<webkit_glue::PasswordFormFillData>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<PasswordFormFillData>");
-}
-
-void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.get() != NULL);
- if (p) {
- // Do not disclose Set-Cookie headers over IPC.
- p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES);
- }
-}
-
-bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read(
- const Message* m, void** iter, param_type* r) {
- bool has_object;
- if (!ReadParam(m, iter, &has_object))
- return false;
- if (has_object)
- *r = new net::HttpResponseHeaders(*m, iter);
- return true;
-}
-
-void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Log(
- const param_type& p, std::wstring* l) {
- l->append(L"<HttpResponseHeaders>");
-}
-
-void ParamTraits<SerializedScriptValue>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.is_null());
- WriteParam(m, p.is_invalid());
- WriteParam(m, p.data());
-}
-
-bool ParamTraits<SerializedScriptValue>::Read(const Message* m, void** iter,
- param_type* r) {
- bool is_null;
- bool is_invalid;
- string16 data;
- bool ok =
- ReadParam(m, iter, &is_null) &&
- ReadParam(m, iter, &is_invalid) &&
- ReadParam(m, iter, &data);
- if (!ok)
- return false;
- r->set_is_null(is_null);
- r->set_is_invalid(is_invalid);
- r->set_data(data);
- return true;
-}
-
-void ParamTraits<SerializedScriptValue>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<SerializedScriptValue>(");
- LogParam(p.is_null(), l);
- l->append(L", ");
- LogParam(p.is_invalid(), l);
- l->append(L", ");
- LogParam(p.data(), l);
- l->append(L")");
-}
-
-void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) {
- WriteParam(m, int(p.type()));
- // TODO(jorlow): Technically, we only need to pack the type being used.
- WriteParam(m, p.string());
- WriteParam(m, p.number());
-}
-
-bool ParamTraits<IndexedDBKey>::Read(const Message* m, void** iter,
- param_type* r) {
- int type;
- string16 string;
- int32 number;
- bool ok =
- ReadParam(m, iter, &type) &&
- ReadParam(m, iter, &string) &&
- ReadParam(m, iter, &number);
- if (!ok)
- return false;
- switch (type) {
- case WebKit::WebIDBKey::NullType:
- r->SetNull();
- return true;
- case WebKit::WebIDBKey::StringType:
- r->Set(string);
- return true;
- case WebKit::WebIDBKey::NumberType:
- r->Set(number);
- return true;
- case WebKit::WebIDBKey::InvalidType:
- r->SetInvalid();
- return true;
- }
- NOTREACHED();
- return false;
-}
-
-void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::wstring* l) {
- l->append(L"<IndexedDBKey>(");
- LogParam(int(p.type()), l);
- l->append(L", ");
- LogParam(p.string(), l);
- l->append(L", ");
- LogParam(p.number(), l);
- l->append(L")");
-}
-
-void ParamTraits<webkit_glue::FormData>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.method);
- WriteParam(m, p.origin);
- WriteParam(m, p.action);
- WriteParam(m, p.user_submitted);
- WriteParam(m, p.fields);
-}
-
-bool ParamTraits<webkit_glue::FormData>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->method) &&
- ReadParam(m, iter, &p->origin) &&
- ReadParam(m, iter, &p->action) &&
- ReadParam(m, iter, &p->user_submitted) &&
- ReadParam(m, iter, &p->fields);
-}
-
-void ParamTraits<webkit_glue::FormData>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<FormData>");
-}
-
-void ParamTraits<RendererPreferences>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.can_accept_load_drops);
- WriteParam(m, p.should_antialias_text);
- WriteParam(m, static_cast<int>(p.hinting));
- WriteParam(m, static_cast<int>(p.subpixel_rendering));
- WriteParam(m, p.focus_ring_color);
- WriteParam(m, p.thumb_active_color);
- WriteParam(m, p.thumb_inactive_color);
- WriteParam(m, p.track_color);
- WriteParam(m, p.active_selection_bg_color);
- WriteParam(m, p.active_selection_fg_color);
- WriteParam(m, p.inactive_selection_bg_color);
- WriteParam(m, p.inactive_selection_fg_color);
- WriteParam(m, p.browser_handles_top_level_requests);
- WriteParam(m, p.caret_blink_interval);
-}
-
-bool ParamTraits<RendererPreferences>::Read(const Message* m, void** iter,
- param_type* p) {
- if (!ReadParam(m, iter, &p->can_accept_load_drops))
- return false;
- if (!ReadParam(m, iter, &p->should_antialias_text))
- return false;
-
- int hinting = 0;
- if (!ReadParam(m, iter, &hinting))
- return false;
- p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting);
-
- int subpixel_rendering = 0;
- if (!ReadParam(m, iter, &subpixel_rendering))
- return false;
- p->subpixel_rendering =
- static_cast<RendererPreferencesSubpixelRenderingEnum>(
- subpixel_rendering);
-
- int focus_ring_color;
- if (!ReadParam(m, iter, &focus_ring_color))
- return false;
- p->focus_ring_color = focus_ring_color;
-
- int thumb_active_color, thumb_inactive_color, track_color;
- int active_selection_bg_color, active_selection_fg_color;
- int inactive_selection_bg_color, inactive_selection_fg_color;
- if (!ReadParam(m, iter, &thumb_active_color) ||
- !ReadParam(m, iter, &thumb_inactive_color) ||
- !ReadParam(m, iter, &track_color) ||
- !ReadParam(m, iter, &active_selection_bg_color) ||
- !ReadParam(m, iter, &active_selection_fg_color) ||
- !ReadParam(m, iter, &inactive_selection_bg_color) ||
- !ReadParam(m, iter, &inactive_selection_fg_color))
- return false;
- p->thumb_active_color = thumb_active_color;
- p->thumb_inactive_color = thumb_inactive_color;
- p->track_color = track_color;
- p->active_selection_bg_color = active_selection_bg_color;
- p->active_selection_fg_color = active_selection_fg_color;
- p->inactive_selection_bg_color = inactive_selection_bg_color;
- p->inactive_selection_fg_color = inactive_selection_fg_color;
-
- if (!ReadParam(m, iter, &p->browser_handles_top_level_requests))
- return false;
-
- if (!ReadParam(m, iter, &p->caret_blink_interval))
- return false;
-
- return true;
-}
-
-void ParamTraits<RendererPreferences>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<RendererPreferences>");
-}
-
-void ParamTraits<WebPreferences>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.standard_font_family);
- WriteParam(m, p.fixed_font_family);
- WriteParam(m, p.serif_font_family);
- WriteParam(m, p.sans_serif_font_family);
- WriteParam(m, p.cursive_font_family);
- WriteParam(m, p.fantasy_font_family);
- WriteParam(m, p.default_font_size);
- WriteParam(m, p.default_fixed_font_size);
- WriteParam(m, p.minimum_font_size);
- WriteParam(m, p.minimum_logical_font_size);
- WriteParam(m, p.default_encoding);
- WriteParam(m, p.javascript_enabled);
- WriteParam(m, p.web_security_enabled);
- WriteParam(m, p.javascript_can_open_windows_automatically);
- WriteParam(m, p.loads_images_automatically);
- WriteParam(m, p.plugins_enabled);
- WriteParam(m, p.dom_paste_enabled);
- WriteParam(m, p.developer_extras_enabled);
- WriteParam(m, p.inspector_settings);
- WriteParam(m, p.site_specific_quirks_enabled);
- WriteParam(m, p.shrinks_standalone_images_to_fit);
- WriteParam(m, p.uses_universal_detector);
- WriteParam(m, p.text_areas_are_resizable);
- WriteParam(m, p.java_enabled);
- WriteParam(m, p.allow_scripts_to_close_windows);
- WriteParam(m, p.uses_page_cache);
- WriteParam(m, p.remote_fonts_enabled);
- WriteParam(m, p.javascript_can_access_clipboard);
- WriteParam(m, p.xss_auditor_enabled);
- WriteParam(m, p.local_storage_enabled);
- WriteParam(m, p.databases_enabled);
- WriteParam(m, p.application_cache_enabled);
- WriteParam(m, p.tabs_to_links);
- WriteParam(m, p.user_style_sheet_enabled);
- WriteParam(m, p.user_style_sheet_location);
- WriteParam(m, p.author_and_user_styles_enabled);
- WriteParam(m, p.allow_universal_access_from_file_urls);
- WriteParam(m, p.allow_file_access_from_file_urls);
- WriteParam(m, p.experimental_webgl_enabled);
- WriteParam(m, p.show_composited_layer_borders);
- WriteParam(m, p.accelerated_compositing_enabled);
- WriteParam(m, p.accelerated_2d_canvas_enabled);
- WriteParam(m, p.memory_info_enabled);
-}
-
-bool ParamTraits<WebPreferences>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->standard_font_family) &&
- ReadParam(m, iter, &p->fixed_font_family) &&
- ReadParam(m, iter, &p->serif_font_family) &&
- ReadParam(m, iter, &p->sans_serif_font_family) &&
- ReadParam(m, iter, &p->cursive_font_family) &&
- ReadParam(m, iter, &p->fantasy_font_family) &&
- ReadParam(m, iter, &p->default_font_size) &&
- ReadParam(m, iter, &p->default_fixed_font_size) &&
- ReadParam(m, iter, &p->minimum_font_size) &&
- ReadParam(m, iter, &p->minimum_logical_font_size) &&
- ReadParam(m, iter, &p->default_encoding) &&
- ReadParam(m, iter, &p->javascript_enabled) &&
- ReadParam(m, iter, &p->web_security_enabled) &&
- ReadParam(m, iter, &p->javascript_can_open_windows_automatically) &&
- ReadParam(m, iter, &p->loads_images_automatically) &&
- ReadParam(m, iter, &p->plugins_enabled) &&
- ReadParam(m, iter, &p->dom_paste_enabled) &&
- ReadParam(m, iter, &p->developer_extras_enabled) &&
- ReadParam(m, iter, &p->inspector_settings) &&
- ReadParam(m, iter, &p->site_specific_quirks_enabled) &&
- ReadParam(m, iter, &p->shrinks_standalone_images_to_fit) &&
- ReadParam(m, iter, &p->uses_universal_detector) &&
- ReadParam(m, iter, &p->text_areas_are_resizable) &&
- ReadParam(m, iter, &p->java_enabled) &&
- ReadParam(m, iter, &p->allow_scripts_to_close_windows) &&
- ReadParam(m, iter, &p->uses_page_cache) &&
- ReadParam(m, iter, &p->remote_fonts_enabled) &&
- ReadParam(m, iter, &p->javascript_can_access_clipboard) &&
- ReadParam(m, iter, &p->xss_auditor_enabled) &&
- ReadParam(m, iter, &p->local_storage_enabled) &&
- ReadParam(m, iter, &p->databases_enabled) &&
- ReadParam(m, iter, &p->application_cache_enabled) &&
- ReadParam(m, iter, &p->tabs_to_links) &&
- ReadParam(m, iter, &p->user_style_sheet_enabled) &&
- ReadParam(m, iter, &p->user_style_sheet_location) &&
- ReadParam(m, iter, &p->author_and_user_styles_enabled) &&
- ReadParam(m, iter, &p->allow_universal_access_from_file_urls) &&
- ReadParam(m, iter, &p->allow_file_access_from_file_urls) &&
- ReadParam(m, iter, &p->experimental_webgl_enabled) &&
- ReadParam(m, iter, &p->show_composited_layer_borders) &&
- ReadParam(m, iter, &p->accelerated_compositing_enabled) &&
- ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) &&
- ReadParam(m, iter, &p->memory_info_enabled);
-}
-
-void ParamTraits<WebPreferences>::Log(const param_type& p, std::wstring* l) {
- l->append(L"<WebPreferences>");
-}
-
-void ParamTraits<WebDropData>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.identity);
- WriteParam(m, p.url);
- WriteParam(m, p.url_title);
- WriteParam(m, p.download_metadata);
- WriteParam(m, p.file_extension);
- WriteParam(m, p.filenames);
- WriteParam(m, p.plain_text);
- WriteParam(m, p.text_html);
- WriteParam(m, p.html_base_url);
- WriteParam(m, p.file_description_filename);
- WriteParam(m, p.file_contents);
-}
-
-bool ParamTraits<WebDropData>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->identity) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->url_title) &&
- ReadParam(m, iter, &p->download_metadata) &&
- ReadParam(m, iter, &p->file_extension) &&
- ReadParam(m, iter, &p->filenames) &&
- ReadParam(m, iter, &p->plain_text) &&
- ReadParam(m, iter, &p->text_html) &&
- ReadParam(m, iter, &p->html_base_url) &&
- ReadParam(m, iter, &p->file_description_filename) &&
- ReadParam(m, iter, &p->file_contents);
-}
-
-void ParamTraits<WebDropData>::Log(const param_type& p, std::wstring* l) {
- l->append(L"<WebDropData>");
-}
-
-void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.valid_schemes());
- WriteParam(m, p.GetAsString());
-}
-
-bool ParamTraits<URLPattern>::Read(const Message* m, void** iter,
- param_type* p) {
- int valid_schemes;
- std::string spec;
- if (!ReadParam(m, iter, &valid_schemes) ||
- !ReadParam(m, iter, &spec))
- return false;
-
- p->set_valid_schemes(valid_schemes);
- return p->Parse(spec);
-}
-
-void ParamTraits<URLPattern>::Log(const param_type& p, std::wstring* l) {
- LogParam(p.GetAsString(), l);
-}
-
-void ParamTraits<EditCommand>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.value);
-}
-
-bool ParamTraits<EditCommand>::Read(const Message* m, void** iter,
- param_type* p) {
- return ReadParam(m, iter, &p->name) && ReadParam(m, iter, &p->value);
-}
-
-void ParamTraits<EditCommand>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.name, l);
- l->append(L":");
- LogParam(p.value, l);
- l->append(L")");
-}
-
-void ParamTraits<webkit_glue::WebCookie>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.value);
- WriteParam(m, p.domain);
- WriteParam(m, p.path);
- WriteParam(m, p.expires);
- WriteParam(m, p.http_only);
- WriteParam(m, p.secure);
- WriteParam(m, p.session);
-}
-
-bool ParamTraits<webkit_glue::WebCookie>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->value) &&
- ReadParam(m, iter, &p->domain) &&
- ReadParam(m, iter, &p->path) &&
- ReadParam(m, iter, &p->expires) &&
- ReadParam(m, iter, &p->http_only) &&
- ReadParam(m, iter, &p->secure) &&
- ReadParam(m, iter, &p->session);
-}
-
-void ParamTraits<webkit_glue::WebCookie>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"<WebCookie>");
-}
-
-void ParamTraits<ExtensionExtent>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.patterns());
-}
-
-bool ParamTraits<ExtensionExtent>::Read(const Message* m, void** iter,
- param_type* p) {
- std::vector<URLPattern> patterns;
- bool success =
- ReadParam(m, iter, &patterns);
- if (!success)
- return false;
-
- for (size_t i = 0; i < patterns.size(); ++i)
- p->AddPattern(patterns[i]);
- return true;
-}
-
-void ParamTraits<ExtensionExtent>::Log(const param_type& p, std::wstring* l) {
- LogParam(p.patterns(), l);
-}
-
-void ParamTraits<appcache::AppCacheResourceInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.url);
- WriteParam(m, p.size);
- WriteParam(m, p.is_manifest);
- WriteParam(m, p.is_master);
- WriteParam(m, p.is_fallback);
- WriteParam(m, p.is_foreign);
- WriteParam(m, p.is_explicit);
-}
-
-bool ParamTraits<appcache::AppCacheResourceInfo>::Read(
- const Message* m, void** iter, param_type* p) {
- return ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->size) &&
- ReadParam(m, iter, &p->is_manifest) &&
- ReadParam(m, iter, &p->is_master) &&
- ReadParam(m, iter, &p->is_fallback) &&
- ReadParam(m, iter, &p->is_foreign) &&
- ReadParam(m, iter, &p->is_explicit);
-}
-
-void ParamTraits<appcache::AppCacheResourceInfo>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.url, l);
- l->append(L", ");
- LogParam(p.size, l);
- l->append(L", ");
- LogParam(p.is_manifest, l);
- l->append(L", ");
- LogParam(p.is_master, l);
- l->append(L", ");
- LogParam(p.is_fallback, l);
- l->append(L", ");
- LogParam(p.is_foreign, l);
- l->append(L", ");
- LogParam(p.is_explicit, l);
- l->append(L")");
-}
-
-void ParamTraits<appcache::AppCacheInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.manifest_url);
- WriteParam(m, p.creation_time);
- WriteParam(m, p.last_update_time);
- WriteParam(m, p.last_access_time);
- WriteParam(m, p.cache_id);
- WriteParam(m, p.status);
- WriteParam(m, p.size);
- WriteParam(m, p.is_complete);
-}
-
-bool ParamTraits<appcache::AppCacheInfo>::Read(const Message* m, void** iter,
- param_type* p) {
- return ReadParam(m, iter, &p->manifest_url) &&
- ReadParam(m, iter, &p->creation_time) &&
- ReadParam(m, iter, &p->last_update_time) &&
- ReadParam(m, iter, &p->last_access_time) &&
- ReadParam(m, iter, &p->cache_id) &&
- ReadParam(m, iter, &p->status) &&
- ReadParam(m, iter, &p->size) &&
- ReadParam(m, iter, &p->is_complete);
-}
-
-void ParamTraits<appcache::AppCacheInfo>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.manifest_url, l);
- l->append(L", ");
- LogParam(p.creation_time, l);
- l->append(L", ");
- LogParam(p.last_update_time, l);
- l->append(L", ");
- LogParam(p.last_access_time, l);
- l->append(L", ");
- LogParam(p.cache_id, l);
- l->append(L", ");
- LogParam(p.status, l);
- l->append(L", ");
- LogParam(p.size, l);
- l->append(L")");
- LogParam(p.is_complete, l);
- l->append(L", ");
-}
-
-void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.id);
- WriteParam(m, p.name);
- WriteParam(m, p.value);
- WriteParam(m, static_cast<int>(p.role));
- WriteParam(m, static_cast<int>(p.state));
- WriteParam(m, p.location);
- WriteParam(m, p.attributes);
- WriteParam(m, p.children);
-}
-
-bool ParamTraits<webkit_glue::WebAccessibility>::Read(
- const Message* m, void** iter, param_type* p) {
- bool ret = ReadParam(m, iter, &p->id);
- ret = ret && ReadParam(m, iter, &p->name);
- ret = ret && ReadParam(m, iter, &p->value);
- int role = -1;
- ret = ret && ReadParam(m, iter, &role);
- if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
- role < webkit_glue::WebAccessibility::NUM_ROLES) {
- p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
- } else {
- p->role = webkit_glue::WebAccessibility::ROLE_NONE;
- }
- int state = 0;
- ret = ret && ReadParam(m, iter, &state);
- p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
- ret = ret && ReadParam(m, iter, &p->location);
- ret = ret && ReadParam(m, iter, &p->attributes);
- ret = ret && ReadParam(m, iter, &p->children);
- return ret;
-}
-
-void ParamTraits<webkit_glue::WebAccessibility>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.id, l);
- l->append(L", ");
- LogParam(p.name, l);
- l->append(L", ");
- LogParam(p.value, l);
- l->append(L", ");
- LogParam(static_cast<int>(p.role), l);
- l->append(L", ");
- LogParam(static_cast<int>(p.state), l);
- l->append(L", ");
- LogParam(p.location, l);
- l->append(L", ");
- LogParam(p.attributes, l);
- l->append(L", ");
- LogParam(p.children, l);
- l->append(L")");
-}
-
-} // namespace IPC
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 2a516ed..0bea305 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -9,8 +9,6 @@
#include <string>
#include <vector>
-// TODO(erg): This list has been temporarily annotated by erg while doing work
-// on which headers to pull out.
#include "app/clipboard/clipboard.h"
#include "app/surface/transport_dib.h"
#include "base/basictypes.h"
@@ -21,37 +19,43 @@
#include "chrome/common/common_param_traits.h"
#include "chrome/common/css_colors.h"
#include "chrome/common/dom_storage_common.h"
-#include "chrome/common/extensions/extension_extent.h" // used in struct
+#include "chrome/common/edit_command.h"
+#include "chrome/common/extensions/extension_extent.h"
+#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/font_descriptor_mac.h"
-#include "chrome/common/indexed_db_key.h" // used in struct
+#include "chrome/common/indexed_db_key.h"
#include "chrome/common/navigation_gesture.h"
#include "chrome/common/page_transition_types.h"
-#include "chrome/common/renderer_preferences.h" // used in struct
+#include "chrome/common/renderer_preferences.h"
#include "chrome/common/resource_response.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/view_types.h"
+#include "chrome/common/serialized_script_value.h"
#include "chrome/common/webkit_param_traits.h"
#include "chrome/common/window_container_type.h"
#include "gfx/native_widget_types.h"
-#include "gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_platform_file.h"
#include "media/audio/audio_io.h"
#include "net/base/upload_data.h"
+#include "net/http/http_response_headers.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
-#include "webkit/appcache/appcache_interfaces.h" // enum appcache::Status
-#include "webkit/glue/password_form.h" // used in struct
+#include "webkit/appcache/appcache_interfaces.h"
+#include "webkit/glue/context_menu.h"
+#include "webkit/glue/form_data.h"
+#include "webkit/glue/form_field.h"
+#include "webkit/glue/password_form.h"
+#include "webkit/glue/password_form_dom_manager.h"
#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/glue/plugins/webplugininfo.h"
#include "webkit/glue/resource_loader_bridge.h"
+#include "webkit/glue/webaccessibility.h"
+#include "webkit/glue/webcookie.h"
+#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webmenuitem.h"
-#include "webkit/glue/webpreferences.h" // used in struct
-
-namespace appcache {
-struct AppCacheInfo;
-struct AppCacheResourceInfo;
-}
+#include "webkit/glue/webpreferences.h"
namespace base {
class Time;
@@ -79,11 +83,6 @@ class IndexedDBKey;
class SerializedScriptValue;
class SkBitmap;
-class URLPattern;
-struct ContextMenuParams;
-struct WebDropData;
-struct WebPluginInfo;
-struct WebPluginMimeType;
// Parameters structure for ViewMsg_Navigate, which has too many data
// parameters to be reasonably put in a predefined IPC message.
@@ -915,9 +914,46 @@ struct ParamTraits<ResourceType::Type> {
template <>
struct ParamTraits<ViewMsg_Navigate_Params> {
typedef ViewMsg_Navigate_Params param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.page_id);
+ WriteParam(m, p.pending_history_list_offset);
+ WriteParam(m, p.current_history_list_offset);
+ WriteParam(m, p.current_history_list_length);
+ WriteParam(m, p.url);
+ WriteParam(m, p.referrer);
+ WriteParam(m, p.transition);
+ WriteParam(m, p.state);
+ WriteParam(m, p.navigation_type);
+ WriteParam(m, p.request_time);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->page_id) &&
+ ReadParam(m, iter, &p->pending_history_list_offset) &&
+ ReadParam(m, iter, &p->current_history_list_offset) &&
+ ReadParam(m, iter, &p->current_history_list_length) &&
+ ReadParam(m, iter, &p->url) &&
+ ReadParam(m, iter, &p->referrer) &&
+ ReadParam(m, iter, &p->transition) &&
+ ReadParam(m, iter, &p->state) &&
+ ReadParam(m, iter, &p->navigation_type) &&
+ ReadParam(m, iter, &p->request_time);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.page_id, l);
+ l->append(L", ");
+ LogParam(p.url, l);
+ l->append(L", ");
+ LogParam(p.transition, l);
+ l->append(L", ");
+ LogParam(p.state, l);
+ l->append(L", ");
+ LogParam(p.navigation_type, l);
+ l->append(L", ");
+ LogParam(p.request_time, l);
+ l->append(L")");
+ }
};
template<>
@@ -940,7 +976,7 @@ struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> {
event = L"NavigationType_RELOAD";
break;
- case ViewMsg_Navigate_Params::RELOAD_IGNORING_CACHE:
+ case ViewMsg_Navigate_Params::RELOAD_IGNORING_CACHE:
event = L"NavigationType_RELOAD_IGNORING_CACHE";
break;
@@ -964,9 +1000,38 @@ struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> {
template <>
struct ParamTraits<webkit_glue::FormField> {
typedef webkit_glue::FormField param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.label());
+ WriteParam(m, p.name());
+ WriteParam(m, p.value());
+ WriteParam(m, p.form_control_type());
+ WriteParam(m, p.size());
+ WriteParam(m, p.option_strings());
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ string16 label, name, value, form_control_type;
+ int size = 0;
+ std::vector<string16> options;
+ bool result = ReadParam(m, iter, &label);
+ result = result && ReadParam(m, iter, &name);
+ result = result && ReadParam(m, iter, &value);
+ result = result && ReadParam(m, iter, &form_control_type);
+ result = result && ReadParam(m, iter, &size);
+ result = result && ReadParam(m, iter, &options);
+ if (!result)
+ return false;
+
+ p->set_label(label);
+ p->set_name(name);
+ p->set_value(value);
+ p->set_form_control_type(form_control_type);
+ p->set_size(size);
+ p->set_option_strings(options);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<FormField>");
+ }
};
// Traits for FontDescriptor structure to pack/unpack.
@@ -1107,52 +1172,234 @@ struct ParamTraits<ViewHostMsg_FrameNavigate_Params> {
template <>
struct ParamTraits<ContextMenuParams> {
typedef ContextMenuParams param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.media_type);
+ WriteParam(m, p.x);
+ WriteParam(m, p.y);
+ WriteParam(m, p.link_url);
+ WriteParam(m, p.unfiltered_link_url);
+ WriteParam(m, p.src_url);
+ WriteParam(m, p.is_image_blocked);
+ WriteParam(m, p.page_url);
+ WriteParam(m, p.frame_url);
+ WriteParam(m, p.media_flags);
+ WriteParam(m, p.selection_text);
+ WriteParam(m, p.misspelled_word);
+ WriteParam(m, p.dictionary_suggestions);
+ WriteParam(m, p.spellcheck_enabled);
+ WriteParam(m, p.is_editable);
+#if defined(OS_MACOSX)
+ WriteParam(m, p.writing_direction_default);
+ WriteParam(m, p.writing_direction_left_to_right);
+ WriteParam(m, p.writing_direction_right_to_left);
+#endif // OS_MACOSX
+ WriteParam(m, p.edit_flags);
+ WriteParam(m, p.security_info);
+ WriteParam(m, p.frame_charset);
+ WriteParam(m, p.custom_items);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->media_type) &&
+ ReadParam(m, iter, &p->x) &&
+ ReadParam(m, iter, &p->y) &&
+ ReadParam(m, iter, &p->link_url) &&
+ ReadParam(m, iter, &p->unfiltered_link_url) &&
+ ReadParam(m, iter, &p->src_url) &&
+ ReadParam(m, iter, &p->is_image_blocked) &&
+ ReadParam(m, iter, &p->page_url) &&
+ ReadParam(m, iter, &p->frame_url) &&
+ ReadParam(m, iter, &p->media_flags) &&
+ ReadParam(m, iter, &p->selection_text) &&
+ ReadParam(m, iter, &p->misspelled_word) &&
+ ReadParam(m, iter, &p->dictionary_suggestions) &&
+ ReadParam(m, iter, &p->spellcheck_enabled) &&
+ ReadParam(m, iter, &p->is_editable) &&
+#if defined(OS_MACOSX)
+ ReadParam(m, iter, &p->writing_direction_default) &&
+ ReadParam(m, iter, &p->writing_direction_left_to_right) &&
+ ReadParam(m, iter, &p->writing_direction_right_to_left) &&
+#endif // OS_MACOSX
+ ReadParam(m, iter, &p->edit_flags) &&
+ ReadParam(m, iter, &p->security_info) &&
+ ReadParam(m, iter, &p->frame_charset) &&
+ ReadParam(m, iter, &p->custom_items);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<ContextMenuParams>");
+ }
};
// Traits for ViewHostMsg_UpdateRect_Params structure to pack/unpack.
template <>
struct ParamTraits<ViewHostMsg_UpdateRect_Params> {
typedef ViewHostMsg_UpdateRect_Params param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.bitmap);
+ WriteParam(m, p.bitmap_rect);
+ WriteParam(m, p.dx);
+ WriteParam(m, p.dy);
+ WriteParam(m, p.scroll_rect);
+ WriteParam(m, p.copy_rects);
+ WriteParam(m, p.view_size);
+ WriteParam(m, p.plugin_window_moves);
+ WriteParam(m, p.flags);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->bitmap) &&
+ ReadParam(m, iter, &p->bitmap_rect) &&
+ ReadParam(m, iter, &p->dx) &&
+ ReadParam(m, iter, &p->dy) &&
+ ReadParam(m, iter, &p->scroll_rect) &&
+ ReadParam(m, iter, &p->copy_rects) &&
+ ReadParam(m, iter, &p->view_size) &&
+ ReadParam(m, iter, &p->plugin_window_moves) &&
+ ReadParam(m, iter, &p->flags);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.bitmap, l);
+ l->append(L", ");
+ LogParam(p.bitmap_rect, l);
+ l->append(L", ");
+ LogParam(p.dx, l);
+ l->append(L", ");
+ LogParam(p.dy, l);
+ l->append(L", ");
+ LogParam(p.scroll_rect, l);
+ l->append(L", ");
+ LogParam(p.copy_rects, l);
+ l->append(L", ");
+ LogParam(p.view_size, l);
+ l->append(L", ");
+ LogParam(p.plugin_window_moves, l);
+ l->append(L", ");
+ LogParam(p.flags, l);
+ l->append(L")");
+ }
};
template <>
struct ParamTraits<webkit_glue::WebPluginGeometry> {
typedef webkit_glue::WebPluginGeometry param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.window);
+ WriteParam(m, p.window_rect);
+ WriteParam(m, p.clip_rect);
+ WriteParam(m, p.cutout_rects);
+ WriteParam(m, p.rects_valid);
+ WriteParam(m, p.visible);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->window) &&
+ ReadParam(m, iter, &p->window_rect) &&
+ ReadParam(m, iter, &p->clip_rect) &&
+ ReadParam(m, iter, &p->cutout_rects) &&
+ ReadParam(m, iter, &p->rects_valid) &&
+ ReadParam(m, iter, &p->visible);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.window, l);
+ l->append(L", ");
+ LogParam(p.window_rect, l);
+ l->append(L", ");
+ LogParam(p.clip_rect, l);
+ l->append(L", ");
+ LogParam(p.cutout_rects, l);
+ l->append(L", ");
+ LogParam(p.rects_valid, l);
+ l->append(L", ");
+ LogParam(p.visible, l);
+ l->append(L")");
+ }
};
// Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
template <>
struct ParamTraits<WebPluginMimeType> {
typedef WebPluginMimeType param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.mime_type);
+ WriteParam(m, p.file_extensions);
+ WriteParam(m, p.description);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return
+ ReadParam(m, iter, &r->mime_type) &&
+ ReadParam(m, iter, &r->file_extensions) &&
+ ReadParam(m, iter, &r->description);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.mime_type, l);
+ l->append(L", ");
+ LogParam(p.file_extensions, l);
+ l->append(L", ");
+ LogParam(p.description, l);
+ l->append(L")");
+ }
};
+
template <>
struct ParamTraits<WebPluginInfo> {
typedef WebPluginInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
+ WriteParam(m, p.path);
+ WriteParam(m, p.version);
+ WriteParam(m, p.desc);
+ WriteParam(m, p.mime_types);
+ WriteParam(m, p.enabled);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return
+ ReadParam(m, iter, &r->name) &&
+ ReadParam(m, iter, &r->path) &&
+ ReadParam(m, iter, &r->version) &&
+ ReadParam(m, iter, &r->desc) &&
+ ReadParam(m, iter, &r->mime_types) &&
+ ReadParam(m, iter, &r->enabled);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.name, l);
+ l->append(L", ");
+ l->append(L", ");
+ LogParam(p.path, l);
+ l->append(L", ");
+ LogParam(p.version, l);
+ l->append(L", ");
+ LogParam(p.desc, l);
+ l->append(L", ");
+ LogParam(p.mime_types, l);
+ l->append(L", ");
+ LogParam(p.enabled, l);
+ l->append(L")");
+ }
};
// Traits for webkit_glue::PasswordFormDomManager::FillData.
template <>
struct ParamTraits<webkit_glue::PasswordFormFillData> {
typedef webkit_glue::PasswordFormFillData param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.basic_data);
+ WriteParam(m, p.additional_logins);
+ WriteParam(m, p.wait_for_username);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return
+ ReadParam(m, iter, &r->basic_data) &&
+ ReadParam(m, iter, &r->additional_logins) &&
+ ReadParam(m, iter, &r->wait_for_username);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<PasswordFormFillData>");
+ }
};
template<>
@@ -1295,9 +1542,24 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
template <>
struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > {
typedef scoped_refptr<net::HttpResponseHeaders> param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.get() != NULL);
+ if (p) {
+ // Do not disclose Set-Cookie headers over IPC.
+ p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES);
+ }
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool has_object;
+ if (!ReadParam(m, iter, &has_object))
+ return false;
+ if (has_object)
+ *r = new net::HttpResponseHeaders(*m, iter);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<HttpResponseHeaders>");
+ }
};
// Traits for webkit_glue::ResourceLoaderBridge::LoadTimingInfo
@@ -1500,26 +1762,108 @@ struct ParamTraits<SyncLoadResult> {
template <>
struct ParamTraits<SerializedScriptValue> {
typedef SerializedScriptValue param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.is_null());
+ WriteParam(m, p.is_invalid());
+ WriteParam(m, p.data());
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool is_null;
+ bool is_invalid;
+ string16 data;
+ bool ok =
+ ReadParam(m, iter, &is_null) &&
+ ReadParam(m, iter, &is_invalid) &&
+ ReadParam(m, iter, &data);
+ if (!ok)
+ return false;
+ r->set_is_null(is_null);
+ r->set_is_invalid(is_invalid);
+ r->set_data(data);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<SerializedScriptValue>(");
+ LogParam(p.is_null(), l);
+ l->append(L", ");
+ LogParam(p.is_invalid(), l);
+ l->append(L", ");
+ LogParam(p.data(), l);
+ l->append(L")");
+ }
};
template <>
struct ParamTraits<IndexedDBKey> {
typedef IndexedDBKey param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, int(p.type()));
+ // TODO(jorlow): Technically, we only need to pack the type being used.
+ WriteParam(m, p.string());
+ WriteParam(m, p.number());
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int type;
+ string16 string;
+ int32 number;
+ bool ok =
+ ReadParam(m, iter, &type) &&
+ ReadParam(m, iter, &string) &&
+ ReadParam(m, iter, &number);
+ if (!ok)
+ return false;
+ switch (type) {
+ case WebKit::WebIDBKey::NullType:
+ r->SetNull();
+ return true;
+ case WebKit::WebIDBKey::StringType:
+ r->Set(string);
+ return true;
+ case WebKit::WebIDBKey::NumberType:
+ r->Set(number);
+ return true;
+ case WebKit::WebIDBKey::InvalidType:
+ r->SetInvalid();
+ return true;
+ }
+ NOTREACHED();
+ return false;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<IndexedDBKey>(");
+ LogParam(int(p.type()), l);
+ l->append(L", ");
+ LogParam(p.string(), l);
+ l->append(L", ");
+ LogParam(p.number(), l);
+ l->append(L")");
+ }
};
// Traits for FormData structure to pack/unpack.
template <>
struct ParamTraits<webkit_glue::FormData> {
typedef webkit_glue::FormData param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
+ WriteParam(m, p.method);
+ WriteParam(m, p.origin);
+ WriteParam(m, p.action);
+ WriteParam(m, p.user_submitted);
+ WriteParam(m, p.fields);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->name) &&
+ ReadParam(m, iter, &p->method) &&
+ ReadParam(m, iter, &p->origin) &&
+ ReadParam(m, iter, &p->action) &&
+ ReadParam(m, iter, &p->user_submitted) &&
+ ReadParam(m, iter, &p->fields);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<FormData>");
+ }
};
// Traits for ViewMsg_Print_Params
@@ -1638,27 +1982,211 @@ struct ParamTraits<CSSColors::CSSColorName> {
template <>
struct ParamTraits<RendererPreferences> {
typedef RendererPreferences param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.can_accept_load_drops);
+ WriteParam(m, p.should_antialias_text);
+ WriteParam(m, static_cast<int>(p.hinting));
+ WriteParam(m, static_cast<int>(p.subpixel_rendering));
+ WriteParam(m, p.focus_ring_color);
+ WriteParam(m, p.thumb_active_color);
+ WriteParam(m, p.thumb_inactive_color);
+ WriteParam(m, p.track_color);
+ WriteParam(m, p.active_selection_bg_color);
+ WriteParam(m, p.active_selection_fg_color);
+ WriteParam(m, p.inactive_selection_bg_color);
+ WriteParam(m, p.inactive_selection_fg_color);
+ WriteParam(m, p.browser_handles_top_level_requests);
+ WriteParam(m, p.caret_blink_interval);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ if (!ReadParam(m, iter, &p->can_accept_load_drops))
+ return false;
+ if (!ReadParam(m, iter, &p->should_antialias_text))
+ return false;
+
+ int hinting = 0;
+ if (!ReadParam(m, iter, &hinting))
+ return false;
+ p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting);
+
+ int subpixel_rendering = 0;
+ if (!ReadParam(m, iter, &subpixel_rendering))
+ return false;
+ p->subpixel_rendering =
+ static_cast<RendererPreferencesSubpixelRenderingEnum>(
+ subpixel_rendering);
+
+ int focus_ring_color;
+ if (!ReadParam(m, iter, &focus_ring_color))
+ return false;
+ p->focus_ring_color = focus_ring_color;
+
+ int thumb_active_color, thumb_inactive_color, track_color;
+ int active_selection_bg_color, active_selection_fg_color;
+ int inactive_selection_bg_color, inactive_selection_fg_color;
+ if (!ReadParam(m, iter, &thumb_active_color) ||
+ !ReadParam(m, iter, &thumb_inactive_color) ||
+ !ReadParam(m, iter, &track_color) ||
+ !ReadParam(m, iter, &active_selection_bg_color) ||
+ !ReadParam(m, iter, &active_selection_fg_color) ||
+ !ReadParam(m, iter, &inactive_selection_bg_color) ||
+ !ReadParam(m, iter, &inactive_selection_fg_color))
+ return false;
+ p->thumb_active_color = thumb_active_color;
+ p->thumb_inactive_color = thumb_inactive_color;
+ p->track_color = track_color;
+ p->active_selection_bg_color = active_selection_bg_color;
+ p->active_selection_fg_color = active_selection_fg_color;
+ p->inactive_selection_bg_color = inactive_selection_bg_color;
+ p->inactive_selection_fg_color = inactive_selection_fg_color;
+
+ if (!ReadParam(m, iter, &p->browser_handles_top_level_requests))
+ return false;
+
+ if (!ReadParam(m, iter, &p->caret_blink_interval))
+ return false;
+
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<RendererPreferences>");
+ }
};
// Traits for WebPreferences structure to pack/unpack.
template <>
struct ParamTraits<WebPreferences> {
typedef WebPreferences param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.standard_font_family);
+ WriteParam(m, p.fixed_font_family);
+ WriteParam(m, p.serif_font_family);
+ WriteParam(m, p.sans_serif_font_family);
+ WriteParam(m, p.cursive_font_family);
+ WriteParam(m, p.fantasy_font_family);
+ WriteParam(m, p.default_font_size);
+ WriteParam(m, p.default_fixed_font_size);
+ WriteParam(m, p.minimum_font_size);
+ WriteParam(m, p.minimum_logical_font_size);
+ WriteParam(m, p.default_encoding);
+ WriteParam(m, p.javascript_enabled);
+ WriteParam(m, p.web_security_enabled);
+ WriteParam(m, p.javascript_can_open_windows_automatically);
+ WriteParam(m, p.loads_images_automatically);
+ WriteParam(m, p.plugins_enabled);
+ WriteParam(m, p.dom_paste_enabled);
+ WriteParam(m, p.developer_extras_enabled);
+ WriteParam(m, p.inspector_settings);
+ WriteParam(m, p.site_specific_quirks_enabled);
+ WriteParam(m, p.shrinks_standalone_images_to_fit);
+ WriteParam(m, p.uses_universal_detector);
+ WriteParam(m, p.text_areas_are_resizable);
+ WriteParam(m, p.java_enabled);
+ WriteParam(m, p.allow_scripts_to_close_windows);
+ WriteParam(m, p.uses_page_cache);
+ WriteParam(m, p.remote_fonts_enabled);
+ WriteParam(m, p.javascript_can_access_clipboard);
+ WriteParam(m, p.xss_auditor_enabled);
+ WriteParam(m, p.local_storage_enabled);
+ WriteParam(m, p.databases_enabled);
+ WriteParam(m, p.application_cache_enabled);
+ WriteParam(m, p.tabs_to_links);
+ WriteParam(m, p.user_style_sheet_enabled);
+ WriteParam(m, p.user_style_sheet_location);
+ WriteParam(m, p.author_and_user_styles_enabled);
+ WriteParam(m, p.allow_universal_access_from_file_urls);
+ WriteParam(m, p.allow_file_access_from_file_urls);
+ WriteParam(m, p.experimental_webgl_enabled);
+ WriteParam(m, p.show_composited_layer_borders);
+ WriteParam(m, p.accelerated_compositing_enabled);
+ WriteParam(m, p.accelerated_2d_canvas_enabled);
+ WriteParam(m, p.memory_info_enabled);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->standard_font_family) &&
+ ReadParam(m, iter, &p->fixed_font_family) &&
+ ReadParam(m, iter, &p->serif_font_family) &&
+ ReadParam(m, iter, &p->sans_serif_font_family) &&
+ ReadParam(m, iter, &p->cursive_font_family) &&
+ ReadParam(m, iter, &p->fantasy_font_family) &&
+ ReadParam(m, iter, &p->default_font_size) &&
+ ReadParam(m, iter, &p->default_fixed_font_size) &&
+ ReadParam(m, iter, &p->minimum_font_size) &&
+ ReadParam(m, iter, &p->minimum_logical_font_size) &&
+ ReadParam(m, iter, &p->default_encoding) &&
+ ReadParam(m, iter, &p->javascript_enabled) &&
+ ReadParam(m, iter, &p->web_security_enabled) &&
+ ReadParam(m, iter, &p->javascript_can_open_windows_automatically) &&
+ ReadParam(m, iter, &p->loads_images_automatically) &&
+ ReadParam(m, iter, &p->plugins_enabled) &&
+ ReadParam(m, iter, &p->dom_paste_enabled) &&
+ ReadParam(m, iter, &p->developer_extras_enabled) &&
+ ReadParam(m, iter, &p->inspector_settings) &&
+ ReadParam(m, iter, &p->site_specific_quirks_enabled) &&
+ ReadParam(m, iter, &p->shrinks_standalone_images_to_fit) &&
+ ReadParam(m, iter, &p->uses_universal_detector) &&
+ ReadParam(m, iter, &p->text_areas_are_resizable) &&
+ ReadParam(m, iter, &p->java_enabled) &&
+ ReadParam(m, iter, &p->allow_scripts_to_close_windows) &&
+ ReadParam(m, iter, &p->uses_page_cache) &&
+ ReadParam(m, iter, &p->remote_fonts_enabled) &&
+ ReadParam(m, iter, &p->javascript_can_access_clipboard) &&
+ ReadParam(m, iter, &p->xss_auditor_enabled) &&
+ ReadParam(m, iter, &p->local_storage_enabled) &&
+ ReadParam(m, iter, &p->databases_enabled) &&
+ ReadParam(m, iter, &p->application_cache_enabled) &&
+ ReadParam(m, iter, &p->tabs_to_links) &&
+ ReadParam(m, iter, &p->user_style_sheet_enabled) &&
+ ReadParam(m, iter, &p->user_style_sheet_location) &&
+ ReadParam(m, iter, &p->author_and_user_styles_enabled) &&
+ ReadParam(m, iter, &p->allow_universal_access_from_file_urls) &&
+ ReadParam(m, iter, &p->allow_file_access_from_file_urls) &&
+ ReadParam(m, iter, &p->experimental_webgl_enabled) &&
+ ReadParam(m, iter, &p->show_composited_layer_borders) &&
+ ReadParam(m, iter, &p->accelerated_compositing_enabled) &&
+ ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) &&
+ ReadParam(m, iter, &p->memory_info_enabled);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebPreferences>");
+ }
};
// Traits for WebDropData
template <>
struct ParamTraits<WebDropData> {
typedef WebDropData param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.identity);
+ WriteParam(m, p.url);
+ WriteParam(m, p.url_title);
+ WriteParam(m, p.download_metadata);
+ WriteParam(m, p.file_extension);
+ WriteParam(m, p.filenames);
+ WriteParam(m, p.plain_text);
+ WriteParam(m, p.text_html);
+ WriteParam(m, p.html_base_url);
+ WriteParam(m, p.file_description_filename);
+ WriteParam(m, p.file_contents);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->identity) &&
+ ReadParam(m, iter, &p->url) &&
+ ReadParam(m, iter, &p->url_title) &&
+ ReadParam(m, iter, &p->download_metadata) &&
+ ReadParam(m, iter, &p->file_extension) &&
+ ReadParam(m, iter, &p->filenames) &&
+ ReadParam(m, iter, &p->plain_text) &&
+ ReadParam(m, iter, &p->text_html) &&
+ ReadParam(m, iter, &p->html_base_url) &&
+ ReadParam(m, iter, &p->file_description_filename) &&
+ ReadParam(m, iter, &p->file_contents);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebDropData>");
+ }
};
// Traits for AudioManager::Format.
@@ -2064,9 +2592,23 @@ struct SimilarTypeTraits<ViewType::Type> {
template <>
struct ParamTraits<URLPattern> {
typedef URLPattern param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.valid_schemes());
+ WriteParam(m, p.GetAsString());
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int valid_schemes;
+ std::string spec;
+ if (!ReadParam(m, iter, &valid_schemes) ||
+ !ReadParam(m, iter, &spec))
+ return false;
+
+ p->set_valid_schemes(valid_schemes);
+ return p->Parse(spec);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ LogParam(p.GetAsString(), l);
+ }
};
template <>
@@ -2109,9 +2651,20 @@ struct ParamTraits<Clipboard::Buffer> {
template <>
struct ParamTraits<EditCommand> {
typedef EditCommand param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
+ WriteParam(m, p.value);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return ReadParam(m, iter, &p->name) && ReadParam(m, iter, &p->value);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.name, l);
+ l->append(L":");
+ LogParam(p.value, l);
+ l->append(L")");
+ }
};
// Traits for DOMStorageType enum.
@@ -2459,9 +3012,30 @@ struct ParamTraits<ViewHostMsg_ShowNotification_Params> {
template <>
struct ParamTraits<webkit_glue::WebCookie> {
typedef webkit_glue::WebCookie param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
+ WriteParam(m, p.value);
+ WriteParam(m, p.domain);
+ WriteParam(m, p.path);
+ WriteParam(m, p.expires);
+ WriteParam(m, p.http_only);
+ WriteParam(m, p.secure);
+ WriteParam(m, p.session);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->name) &&
+ ReadParam(m, iter, &p->value) &&
+ ReadParam(m, iter, &p->domain) &&
+ ReadParam(m, iter, &p->path) &&
+ ReadParam(m, iter, &p->expires) &&
+ ReadParam(m, iter, &p->http_only) &&
+ ReadParam(m, iter, &p->secure) &&
+ ReadParam(m, iter, &p->session);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebCookie>");
+ }
};
template<>
@@ -2609,9 +3183,23 @@ struct ParamTraits<ViewHostMsg_CreateWindow_Params> {
template <>
struct ParamTraits<ExtensionExtent> {
typedef ExtensionExtent param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.patterns());
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ std::vector<URLPattern> patterns;
+ bool success =
+ ReadParam(m, iter, &patterns);
+ if (!success)
+ return false;
+
+ for (size_t i = 0; i < patterns.size(); ++i)
+ p->AddPattern(patterns[i]);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ LogParam(p.patterns(), l);
+ }
};
template <>
@@ -2649,18 +3237,86 @@ struct ParamTraits<ViewMsg_ExtensionExtentsUpdated_Params> {
template<>
struct ParamTraits<appcache::AppCacheResourceInfo> {
typedef appcache::AppCacheResourceInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.url);
+ WriteParam(m, p.size);
+ WriteParam(m, p.is_manifest);
+ WriteParam(m, p.is_master);
+ WriteParam(m, p.is_fallback);
+ WriteParam(m, p.is_foreign);
+ WriteParam(m, p.is_explicit);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return ReadParam(m, iter, &p->url) &&
+ ReadParam(m, iter, &p->size) &&
+ ReadParam(m, iter, &p->is_manifest) &&
+ ReadParam(m, iter, &p->is_master) &&
+ ReadParam(m, iter, &p->is_fallback) &&
+ ReadParam(m, iter, &p->is_foreign) &&
+ ReadParam(m, iter, &p->is_explicit);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.url, l);
+ l->append(L", ");
+ LogParam(p.size, l);
+ l->append(L", ");
+ LogParam(p.is_manifest, l);
+ l->append(L", ");
+ LogParam(p.is_master, l);
+ l->append(L", ");
+ LogParam(p.is_fallback, l);
+ l->append(L", ");
+ LogParam(p.is_foreign, l);
+ l->append(L", ");
+ LogParam(p.is_explicit, l);
+ l->append(L")");
+ }
};
template <>
-struct ParamTraits<appcache::AppCacheInfo> {
- typedef appcache::AppCacheInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
-};
+ struct ParamTraits<appcache::AppCacheInfo> {
+ typedef appcache::AppCacheInfo param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.manifest_url);
+ WriteParam(m, p.creation_time);
+ WriteParam(m, p.last_update_time);
+ WriteParam(m, p.last_access_time);
+ WriteParam(m, p.cache_id);
+ WriteParam(m, p.status);
+ WriteParam(m, p.size);
+ WriteParam(m, p.is_complete);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return ReadParam(m, iter, &p->manifest_url) &&
+ ReadParam(m, iter, &p->creation_time) &&
+ ReadParam(m, iter, &p->last_update_time) &&
+ ReadParam(m, iter, &p->last_access_time) &&
+ ReadParam(m, iter, &p->cache_id) &&
+ ReadParam(m, iter, &p->status) &&
+ ReadParam(m, iter, &p->size) &&
+ ReadParam(m, iter, &p->is_complete);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.manifest_url, l);
+ l->append(L", ");
+ LogParam(p.creation_time, l);
+ l->append(L", ");
+ LogParam(p.last_update_time, l);
+ l->append(L", ");
+ LogParam(p.last_access_time, l);
+ l->append(L", ");
+ LogParam(p.cache_id, l);
+ l->append(L", ");
+ LogParam(p.status, l);
+ l->append(L", ");
+ LogParam(p.size, l);
+ l->append(L")");
+ LogParam(p.is_complete, l);
+ l->append(L", ");
+ }
+ };
template <>
struct ParamTraits<WindowContainerType> {
@@ -2679,16 +3335,62 @@ struct ParamTraits<WindowContainerType> {
return true;
}
static void Log(const param_type& p, std::wstring* l) {
- ParamTraits<int>::Log(static_cast<int>(p), l);
+ LogParam(p, l);
}
};
template <>
struct ParamTraits<webkit_glue::WebAccessibility> {
typedef webkit_glue::WebAccessibility param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.id);
+ WriteParam(m, p.name);
+ WriteParam(m, p.value);
+ WriteParam(m, static_cast<int>(p.role));
+ WriteParam(m, static_cast<int>(p.state));
+ WriteParam(m, p.location);
+ WriteParam(m, p.attributes);
+ WriteParam(m, p.children);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ bool ret = ReadParam(m, iter, &p->id);
+ ret = ret && ReadParam(m, iter, &p->name);
+ ret = ret && ReadParam(m, iter, &p->value);
+ int role = -1;
+ ret = ret && ReadParam(m, iter, &role);
+ if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
+ role < webkit_glue::WebAccessibility::NUM_ROLES) {
+ p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
+ } else {
+ p->role = webkit_glue::WebAccessibility::ROLE_NONE;
+ }
+ int state = 0;
+ ret = ret && ReadParam(m, iter, &state);
+ p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
+ ret = ret && ReadParam(m, iter, &p->location);
+ ret = ret && ReadParam(m, iter, &p->attributes);
+ ret = ret && ReadParam(m, iter, &p->children);
+ return ret;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.id, l);
+ l->append(L", ");
+ LogParam(p.name, l);
+ l->append(L", ");
+ LogParam(p.value, l);
+ l->append(L", ");
+ LogParam(static_cast<int>(p.role), l);
+ l->append(L", ");
+ LogParam(static_cast<int>(p.state), l);
+ l->append(L", ");
+ LogParam(p.location, l);
+ l->append(L", ");
+ LogParam(p.attributes, l);
+ l->append(L", ");
+ LogParam(p.children, l);
+ l->append(L")");
+ }
};
// Traits for ViewMsg_DeviceOrientationUpdated_Params
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 4fa01b8..11dc724 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -16,14 +16,25 @@
#include "base/nullable_string16.h"
#include "base/platform_file.h"
#include "base/sync_socket.h"
+#include "base/time.h"
+#include "base/values.h"
#include "chrome/common/content_settings.h"
+#include "chrome/common/extensions/update_manifest.h"
#include "chrome/common/geoposition.h"
#include "chrome/common/nacl_types.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/page_zoom.h"
+#include "chrome/common/thumbnail_score.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/window_container_type.h"
+#include "gfx/rect.h"
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "webkit/glue/dom_operations.h"
+#include "webkit/glue/form_field.h"
+#include "webkit/glue/webcursor.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
@@ -41,15 +52,6 @@
// Substitution map for l10n messages.
typedef std::map<std::string, std::string> SubstitutionMap;
-class SkBitmap;
-struct ThumbnailScore;
-class WebCursor;
-
-namespace IPC {
-struct ChannelHandle;
-class Message;
-}
-
//-----------------------------------------------------------------------------
// RenderView messages
// These are messages sent from the browser to the renderer process.
@@ -188,7 +190,7 @@ IPC_BEGIN_MESSAGES(View)
//
// This message must be sent just before sending a key event.
IPC_MESSAGE_ROUTED1(ViewMsg_SetEditCommandsForNextKeyEvent,
- std::vector<EditCommand> /* edit_commands */)
+ EditCommands /* edit_commands */)
// Message payload is the name/value of a WebCore edit command to execute.
IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand,
diff --git a/chrome/common/render_messages_unittest.cc b/chrome/common/render_messages_unittest.cc
index 4fc0aab..ccfc898 100644
--- a/chrome/common/render_messages_unittest.cc
+++ b/chrome/common/render_messages_unittest.cc
@@ -7,8 +7,6 @@
#include "base/utf_string_conversions.h"
#include "chrome/common/render_messages.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/webaccessibility.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
TEST(RenderMessagesUnittest, WebAccessibility) {
// Test a simple case.
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index 6e672dd..f97f4ef 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -17,7 +17,6 @@
#include "chrome/common/security_filter_peer.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
-#include "net/http/http_response_headers.h"
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
index 177fea9..3e76678 100644
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ b/chrome/common/resource_dispatcher_unittest.cc
@@ -11,7 +11,6 @@
#include "base/scoped_ptr.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/resource_dispatcher.h"
-#include "net/http/http_response_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/appcache/appcache_interfaces.h"
diff --git a/chrome/common/service_messages.cc b/chrome/common/service_messages.cc
deleted file mode 100644
index 97a10fd..0000000
--- a/chrome/common/service_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/service_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/service_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/utility_messages.cc b/chrome/common/utility_messages.cc
deleted file mode 100644
index 4c8e567..0000000
--- a/chrome/common/utility_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/utility_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/utility_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
deleted file mode 100644
index 4a81d46..0000000
--- a/chrome/common/webkit_param_traits.cc
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/webkit_param_traits.h"
-
-#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
-
-namespace IPC {
-
-void ParamTraits<WebKit::WebRect>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.x);
- WriteParam(m, p.y);
- WriteParam(m, p.width);
- WriteParam(m, p.height);
- }
-
-bool ParamTraits<WebKit::WebRect>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->x) &&
- ReadParam(m, iter, &p->y) &&
- ReadParam(m, iter, &p->width) &&
- ReadParam(m, iter, &p->height);
-}
-
-void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.x, l);
- l->append(L", ");
- LogParam(p.y, l);
- l->append(L", ");
- LogParam(p.width, l);
- l->append(L", ");
- LogParam(p.height, l);
- l->append(L")");
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.depth);
- WriteParam(m, p.depthPerComponent);
- WriteParam(m, p.isMonochrome);
- WriteParam(m, p.rect);
- WriteParam(m, p.availableRect);
-}
-
-bool ParamTraits<WebKit::WebScreenInfo>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->depth) &&
- ReadParam(m, iter, &p->depthPerComponent) &&
- ReadParam(m, iter, &p->isMonochrome) &&
- ReadParam(m, iter, &p->rect) &&
- ReadParam(m, iter, &p->availableRect);
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.depth, l);
- l->append(L", ");
- LogParam(p.depthPerComponent, l);
- l->append(L", ");
- LogParam(p.isMonochrome, l);
- l->append(L", ");
- LogParam(p.rect, l);
- l->append(L", ");
- LogParam(p.availableRect, l);
- l->append(L")");
-}
-
-void ParamTraits<WebKit::WebFindOptions>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.forward);
- WriteParam(m, p.matchCase);
- WriteParam(m, p.findNext);
-}
-
-bool ParamTraits<WebKit::WebFindOptions>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->forward) &&
- ReadParam(m, iter, &p->matchCase) &&
- ReadParam(m, iter, &p->findNext);
-}
-
-void ParamTraits<WebKit::WebFindOptions>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.forward, l);
- l->append(L", ");
- LogParam(p.matchCase, l);
- l->append(L", ");
- LogParam(p.findNext, l);
- l->append(L")");
-}
-
-void ParamTraits<WebKit::WebMediaPlayerAction>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, static_cast<int>(p.type));
- WriteParam(m, p.enable);
-}
-
-bool ParamTraits<WebKit::WebMediaPlayerAction>::Read(const Message* m,
- void** iter,
- param_type* r) {
- int temp;
- if (!ReadParam(m, iter, &temp))
- return false;
- r->type = static_cast<param_type::Type>(temp);
- return ReadParam(m, iter, &r->enable);
-}
-
-void ParamTraits<WebKit::WebMediaPlayerAction>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- switch (p.type) {
- case WebKit::WebMediaPlayerAction::Play:
- l->append(L"Play");
- break;
- case WebKit::WebMediaPlayerAction::Mute:
- l->append(L"Mute");
- break;
- case WebKit::WebMediaPlayerAction::Loop:
- l->append(L"Loop");
- break;
- default:
- l->append(L"Unknown");
- break;
- }
- l->append(L", ");
- LogParam(p.enable, l);
- l->append(L")");
-}
-
-void ParamTraits<WebKit::WebCompositionUnderline>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.startOffset);
- WriteParam(m, p.endOffset);
- WriteParam(m, p.color);
- WriteParam(m, p.thick);
-}
-
-bool ParamTraits<WebKit::WebCompositionUnderline>::Read(
- const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->startOffset) &&
- ReadParam(m, iter, &p->endOffset) &&
- ReadParam(m, iter, &p->color) &&
- ReadParam(m, iter, &p->thick);
-}
-
-void ParamTraits<WebKit::WebCompositionUnderline>::Log(const param_type& p,
- std::wstring* l) {
- l->append(L"(");
- LogParam(p.startOffset, l);
- l->append(L",");
- LogParam(p.endOffset, l);
- l->append(L":");
- LogParam(p.color, l);
- l->append(L":");
- LogParam(p.thick, l);
- l->append(L")");
-}
-
-} // namespace IPC
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h
index 63cb10b..748c26b 100644
--- a/chrome/common/webkit_param_traits.h
+++ b/chrome/common/webkit_param_traits.h
@@ -26,38 +26,80 @@
#include "ipc/ipc_message_utils.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
#include "third_party/WebKit/WebKit/chromium/public/WebTextInputType.h"
-namespace WebKit {
-struct WebCompositionUnderline;
-struct WebFindOptions;
-struct WebMediaPlayerAction;
-struct WebRect;
-struct WebScreenInfo;
-}
-
namespace IPC {
template <>
struct ParamTraits<WebKit::WebRect> {
typedef WebKit::WebRect param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.x);
+ WriteParam(m, p.y);
+ WriteParam(m, p.width);
+ WriteParam(m, p.height);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->x) &&
+ ReadParam(m, iter, &p->y) &&
+ ReadParam(m, iter, &p->width) &&
+ ReadParam(m, iter, &p->height);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.x, l);
+ l->append(L", ");
+ LogParam(p.y, l);
+ l->append(L", ");
+ LogParam(p.width, l);
+ l->append(L", ");
+ LogParam(p.height, l);
+ l->append(L")");
+ }
};
template <>
struct ParamTraits<WebKit::WebScreenInfo> {
typedef WebKit::WebScreenInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.depth);
+ WriteParam(m, p.depthPerComponent);
+ WriteParam(m, p.isMonochrome);
+ WriteParam(m, p.rect);
+ WriteParam(m, p.availableRect);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->depth) &&
+ ReadParam(m, iter, &p->depthPerComponent) &&
+ ReadParam(m, iter, &p->isMonochrome) &&
+ ReadParam(m, iter, &p->rect) &&
+ ReadParam(m, iter, &p->availableRect);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.depth, l);
+ l->append(L", ");
+ LogParam(p.depthPerComponent, l);
+ l->append(L", ");
+ LogParam(p.isMonochrome, l);
+ l->append(L", ");
+ LogParam(p.rect, l);
+ l->append(L", ");
+ LogParam(p.availableRect, l);
+ l->append(L")");
+ }
};
template <>
@@ -99,9 +141,26 @@ struct ParamTraits<WebKit::WebPopupType> {
template <>
struct ParamTraits<WebKit::WebFindOptions> {
typedef WebKit::WebFindOptions param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.forward);
+ WriteParam(m, p.matchCase);
+ WriteParam(m, p.findNext);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->forward) &&
+ ReadParam(m, iter, &p->matchCase) &&
+ ReadParam(m, iter, &p->findNext);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.forward, l);
+ l->append(L", ");
+ LogParam(p.matchCase, l);
+ l->append(L", ");
+ LogParam(p.findNext, l);
+ l->append(L")");
+ }
};
template <>
@@ -269,9 +328,37 @@ struct ParamTraits<WebKit::WebDragOperation> {
template <>
struct ParamTraits<WebKit::WebMediaPlayerAction> {
typedef WebKit::WebMediaPlayerAction param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, static_cast<int>(p.type));
+ WriteParam(m, p.enable);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int temp;
+ if (!ReadParam(m, iter, &temp))
+ return false;
+ r->type = static_cast<param_type::Type>(temp);
+ return ReadParam(m, iter, &r->enable);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ switch (p.type) {
+ case WebKit::WebMediaPlayerAction::Play:
+ l->append(L"Play");
+ break;
+ case WebKit::WebMediaPlayerAction::Mute:
+ l->append(L"Mute");
+ break;
+ case WebKit::WebMediaPlayerAction::Loop:
+ l->append(L"Loop");
+ break;
+ default:
+ l->append(L"Unknown");
+ break;
+ }
+ l->append(L", ");
+ LogParam(p.enable, l);
+ l->append(L")");
+ }
};
template <>
@@ -291,9 +378,30 @@ template <>
template <>
struct ParamTraits<WebKit::WebCompositionUnderline> {
typedef WebKit::WebCompositionUnderline param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.startOffset);
+ WriteParam(m, p.endOffset);
+ WriteParam(m, p.color);
+ WriteParam(m, p.thick);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->startOffset) &&
+ ReadParam(m, iter, &p->endOffset) &&
+ ReadParam(m, iter, &p->color) &&
+ ReadParam(m, iter, &p->thick);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.startOffset, l);
+ l->append(L",");
+ LogParam(p.endOffset, l);
+ l->append(L":");
+ LogParam(p.color, l);
+ l->append(L":");
+ LogParam(p.thick, l);
+ l->append(L")");
+ }
};
template <>
diff --git a/chrome/common/worker_messages.cc b/chrome/common/worker_messages.cc
deleted file mode 100644
index 437e030..0000000
--- a/chrome/common/worker_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/common/worker_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/common/worker_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 1bd9903..1ae410e 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -27,7 +27,6 @@
#include "chrome/plugin/chrome_plugin_host.h"
#include "chrome/plugin/npobject_util.h"
#include "chrome/renderer/render_thread.h"
-#include "ipc/ipc_channel_handle.h"
#include "net/base/net_errors.h"
#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/chrome/renderer/blocked_plugin.cc b/chrome/renderer/blocked_plugin.cc
index 76c7fe9..b3c0973 100644
--- a/chrome/renderer/blocked_plugin.cc
+++ b/chrome/renderer/blocked_plugin.cc
@@ -8,7 +8,6 @@
#include "app/resource_bundle.h"
#include "base/file_path.h"
#include "base/string_piece.h"
-#include "base/values.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/plugin_group.h"
diff --git a/chrome/renderer/indexed_db_dispatcher.cc b/chrome/renderer/indexed_db_dispatcher.cc
index 1087eec..83f7f49 100644
--- a/chrome/renderer/indexed_db_dispatcher.cc
+++ b/chrome/renderer/indexed_db_dispatcher.cc
@@ -4,7 +4,6 @@
#include "chrome/renderer/indexed_db_dispatcher.h"
-#include "chrome/common/indexed_db_key.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/serialized_script_value.h"
#include "chrome/renderer/render_thread.h"
diff --git a/chrome/renderer/pepper_devices.cc b/chrome/renderer/pepper_devices.cc
index 8d0e403..e140727 100644
--- a/chrome/renderer/pepper_devices.cc
+++ b/chrome/renderer/pepper_devices.cc
@@ -6,9 +6,9 @@
#include "chrome/renderer/render_thread.h"
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "skia/ext/platform_canvas.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/plugins/webplugin.h"
+#include "third_party/skia/include/core/SkBitmap.h"
namespace {
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 631e5b4..3b72e6a 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -22,7 +22,6 @@
#include "base/thread_local.h"
#include "base/trace_event.h"
#include "base/utf_string_conversions.h"
-#include "base/values.h"
#include "chrome/common/appcache/appcache_dispatcher.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5ff171d..2063211 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -95,7 +95,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFormControlElement.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
@@ -127,7 +126,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
-#include "webkit/glue/context_menu.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
@@ -146,7 +144,6 @@
#include "webkit/glue/plugins/webplugin_impl.h"
#include "webkit/glue/plugins/webview_plugin.h"
#include "webkit/glue/site_isolation_metrics.h"
-#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webmediaplayer_impl.h"
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index e91efe1..0ca11f1 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -7,7 +7,6 @@
#include "app/surface/transport_dib.h"
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "build/build_config.h"
@@ -25,7 +24,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_POSIX)
diff --git a/chrome/renderer/renderer_webcookiejar_impl.cc b/chrome/renderer/renderer_webcookiejar_impl.cc
index 711338b..53a7794 100644
--- a/chrome/renderer/renderer_webcookiejar_impl.cc
+++ b/chrome/renderer/renderer_webcookiejar_impl.cc
@@ -7,7 +7,6 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCookie.h"
-#include "webkit/glue/webcookie.h"
using WebKit::WebCookie;
using WebKit::WebString;
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
index c90af60..a841963 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
@@ -24,7 +24,6 @@
#include "chrome/renderer/safe_browsing/features.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
-#include "net/http/http_response_headers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index a5053e4..645473d 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -15,7 +15,6 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/histogram.h"
#if defined(OS_MACOSX)
#include "base/mac_util.h"
#endif
diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h
index f85d2a9d0..6f53f1c 100644
--- a/chrome/renderer/webplugin_delegate_pepper.h
+++ b/chrome/renderer/webplugin_delegate_pepper.h
@@ -19,7 +19,6 @@
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserCompletion.h"
#include "webkit/glue/plugins/webplugin_delegate.h"
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index f1019cb..04103a1 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -36,7 +36,6 @@
#include "gfx/size.h"
#include "grit/generated_resources.h"
#include "grit/renderer_resources.h"
-#include "ipc/ipc_channel_handle.h"
#include "net/base/mime_util.h"
#include "printing/native_metafile.h"
#include "skia/ext/platform_canvas.h"
diff --git a/chrome/test/automation/automation_messages.cc b/chrome/test/automation/automation_messages.cc
deleted file mode 100644
index 8c26327..0000000
--- a/chrome/test/automation/automation_messages.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 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 "chrome/test/automation/automation_messages.h"
-
-#define MESSAGES_INTERNAL_IMPL_FILE \
- "chrome/test/automation/automation_messages_internal.h"
-#include "ipc/ipc_message_impl_macros.h"
diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc
index 9817ade..f9340e6 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/ipc/ipc_fuzzing_tests.cc
@@ -12,7 +12,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message_utils.h"
-#include "ipc/ipc_message_utils_impl.h"
#include "ipc/ipc_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
diff --git a/ipc/ipc_message_impl_macros.h b/ipc/ipc_message_impl_macros.h
deleted file mode 100644
index f9eede9..0000000
--- a/ipc/ipc_message_impl_macros.h
+++ /dev/null
@@ -1,674 +0,0 @@
-// Copyright (c) 2010 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.
-
-// The file ipc_messsage_macros.h defines the classes for individual
-// messages. This file works similarly, except that it defines the
-// implementations of the constructors and the logging methods. (These only
-// have to be generated once). It is meant to be included in a XXX_messages.cc
-// file.
-
-#ifndef IPC_IPC_MESSAGE_IMPL_MACROS_H_
-#define IPC_IPC_MESSAGE_IMPL_MACROS_H_
-
-#include "ipc/ipc_message_utils.h"
-#include "ipc/ipc_message_utils_impl.h"
-
-#ifndef MESSAGES_INTERNAL_IMPL_FILE
-#error This file should only be included by X_messages.cc, which needs to define MESSAGES_INTERNAL_IMPL_FILE first.
-#endif
-
-// Trick scons and xcode into seeing the possible real dependencies since they
-// don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828
-#if 0
-#include "ipc/ipc_sync_message_unittest.h"
-#include "chrome/common/plugin_messages_internal.h"
-#include "chrome/common/render_messages_internal.h"
-#include "chrome/common/devtools_messages_internal.h"
-#include "chrome/test/automation/automation_messages_internal.h"
-#include "chrome/common/worker_messages_internal.h"
-#endif
-
-// These are probalby still defined because of ipc_message_macros.h should be
-// included before us for the class/method declarations.
-#undef IPC_BEGIN_MESSAGES
-#undef IPC_END_MESSAGES
-#undef IPC_MESSAGE_CONTROL0
-#undef IPC_MESSAGE_CONTROL1
-#undef IPC_MESSAGE_CONTROL2
-#undef IPC_MESSAGE_CONTROL3
-#undef IPC_MESSAGE_CONTROL4
-#undef IPC_MESSAGE_CONTROL5
-#undef IPC_MESSAGE_ROUTED0
-#undef IPC_MESSAGE_ROUTED1
-#undef IPC_MESSAGE_ROUTED2
-#undef IPC_MESSAGE_ROUTED3
-#undef IPC_MESSAGE_ROUTED4
-#undef IPC_MESSAGE_ROUTED5
-#undef IPC_SYNC_MESSAGE_CONTROL0_0
-#undef IPC_SYNC_MESSAGE_CONTROL0_1
-#undef IPC_SYNC_MESSAGE_CONTROL0_2
-#undef IPC_SYNC_MESSAGE_CONTROL0_3
-#undef IPC_SYNC_MESSAGE_CONTROL1_0
-#undef IPC_SYNC_MESSAGE_CONTROL1_1
-#undef IPC_SYNC_MESSAGE_CONTROL1_2
-#undef IPC_SYNC_MESSAGE_CONTROL1_3
-#undef IPC_SYNC_MESSAGE_CONTROL2_0
-#undef IPC_SYNC_MESSAGE_CONTROL2_1
-#undef IPC_SYNC_MESSAGE_CONTROL2_2
-#undef IPC_SYNC_MESSAGE_CONTROL2_3
-#undef IPC_SYNC_MESSAGE_CONTROL3_1
-#undef IPC_SYNC_MESSAGE_CONTROL3_2
-#undef IPC_SYNC_MESSAGE_CONTROL3_3
-#undef IPC_SYNC_MESSAGE_CONTROL4_1
-#undef IPC_SYNC_MESSAGE_CONTROL4_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_0
-#undef IPC_SYNC_MESSAGE_ROUTED0_1
-#undef IPC_SYNC_MESSAGE_ROUTED0_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_0
-#undef IPC_SYNC_MESSAGE_ROUTED1_1
-#undef IPC_SYNC_MESSAGE_ROUTED1_2
-#undef IPC_SYNC_MESSAGE_ROUTED1_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_4
-#undef IPC_SYNC_MESSAGE_ROUTED2_0
-#undef IPC_SYNC_MESSAGE_ROUTED2_1
-#undef IPC_SYNC_MESSAGE_ROUTED2_2
-#undef IPC_SYNC_MESSAGE_ROUTED2_3
-#undef IPC_SYNC_MESSAGE_ROUTED3_0
-#undef IPC_SYNC_MESSAGE_ROUTED3_1
-#undef IPC_SYNC_MESSAGE_ROUTED3_2
-#undef IPC_SYNC_MESSAGE_ROUTED3_3
-#undef IPC_SYNC_MESSAGE_ROUTED4_0
-#undef IPC_SYNC_MESSAGE_ROUTED4_1
-#undef IPC_SYNC_MESSAGE_ROUTED4_2
-#undef IPC_SYNC_MESSAGE_ROUTED4_3
-#undef IPC_SYNC_MESSAGE_ROUTED5_0
-#undef IPC_SYNC_MESSAGE_ROUTED5_1
-#undef IPC_SYNC_MESSAGE_ROUTED5_2
-#undef IPC_SYNC_MESSAGE_ROUTED5_3
-
-// These don't do anything during this pass.
-#define IPC_BEGIN_MESSAGES(label)
-#define IPC_END_MESSAGES(label)
-
-// Every class must include a destructor and a log method that is keyed to the
-// specific types.
-#define IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class) \
- msg_class::~msg_class() {} \
- \
- void msg_class::Log(const Message* msg, std::wstring* l) { \
- Param p; \
- if (Read(msg, &p)) \
- IPC::LogParam(p, l); \
- }
-
-// This derives from IPC::Message and thus doesn't need us to keep the
-// implementations in this impl file.
-#define IPC_MESSAGE_CONTROL0(msg_class)
-
-#define IPC_MESSAGE_CONTROL1(msg_class, type1) \
- msg_class::msg_class(const type1& arg1) \
- : IPC::MessageWithTuple< Tuple1<type1> >( \
- MSG_ROUTING_CONTROL, ID, MakeRefTuple(arg1)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \
- msg_class::msg_class(const type1& arg1, const type2& arg2) \
- : IPC::MessageWithTuple< Tuple2<type1, type2> >( \
- MSG_ROUTING_CONTROL, ID, MakeRefTuple(arg1, arg2)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \
- msg_class::msg_class(const type1& arg1, const type2& arg2, \
- const type3& arg3) \
- : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \
- MSG_ROUTING_CONTROL, ID, MakeRefTuple(arg1, arg2, arg3)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \
- msg_class::msg_class(const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4) \
- : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \
- MSG_ROUTING_CONTROL, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \
- msg_class::msg_class(const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4, \
- const type5& arg5) \
- : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-// This derives from IPC::Message and thus doesn't need us to keep the
-// implementations in this impl file.
-#define IPC_MESSAGE_ROUTED0(msg_class)
-
-#define IPC_MESSAGE_ROUTED1(msg_class, type1) \
- msg_class::msg_class(int32 routing_id, const type1& arg1) \
- : IPC::MessageWithTuple< Tuple1<type1> >( \
- routing_id, ID, MakeRefTuple(arg1)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \
- msg_class::msg_class(int32 routing_id, const type1& arg1, const type2& arg2) \
- : IPC::MessageWithTuple< Tuple2<type1, type2> >( \
- routing_id, ID, MakeRefTuple(arg1, arg2)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \
- msg_class::msg_class(int32 routing_id, const type1& arg1, \
- const type2& arg2, const type3& arg3) \
- : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \
- routing_id, ID, MakeRefTuple(arg1, arg2, arg3)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \
- msg_class::msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4) \
- : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \
- routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \
- msg_class::msg_class(int32 routing_id, const type1& arg1, \
- const type2& arg2, const type3& arg3, \
- const type4& arg4, const type5& arg5) \
- : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \
- routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \
- \
- IPC_ASYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-// -----------------------------------------------------------------------------
-
-// Every class must include a destructor and a log method that is keyed to the
-// specific types.
-#define IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class) \
- msg_class::~msg_class() {} \
- \
- void msg_class::Log(const Message* msg, std::wstring* l) { \
- if (msg->is_sync()) { \
- TupleTypes<SendParam>::ValueTuple p; \
- if (ReadSendParam(msg, &p)) \
- IPC::LogParam(p, l); \
- \
- AddOutputParamsToLog(msg, l); \
- } else { \
- TupleTypes<ReplyParam>::ValueTuple p; \
- if (ReadReplyParam(msg, &p)) \
- IPC::LogParam(p, l); \
- } \
- }
-
-#define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
- msg_class::msg_class() \
- : IPC::MessageWithReply<Tuple0, Tuple0 >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeTuple(), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
- msg_class::msg_class(type1_out* arg1) \
- : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeTuple(), MakeRefTuple(*arg1)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \
- msg_class::msg_class(type1_out* arg1, type2_out* arg2) \
- : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, \
- type3_out) \
- msg_class::msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3) \
- : IPC::MessageWithReply<Tuple0, Tuple3<type1_out&, type2_out&, \
- type3_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \
- msg_class::msg_class(const type1_in& arg1) \
- : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \
- msg_class::msg_class(const type1_in& arg1, type1_out* arg2) \
- : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \
- msg_class::msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3) \
- : IPC::MessageWithReply<Tuple1<type1_in>, \
- Tuple2<type1_out&, type2_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, \
- type2_out, type3_out) \
- msg_class::msg_class(const type1_in& arg1, type1_out* arg2, \
- type2_out* arg3, type3_out* arg4) \
- : IPC::MessageWithReply<Tuple1<type1_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- type1_out* arg3) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple1<type1_out&> >( \
- MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, \
- type1_out, type2_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- type1_out* arg3, type2_out* arg4) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, \
- type1_out, type2_out, type3_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- type1_out* arg3, type2_out* arg4, type3_out* arg5) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
- ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, \
- type3_in, type1_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- const type3_in& arg3, type1_out* arg4) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, \
- type3_in, type1_out, type2_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- const type3_in& arg3, type1_out* arg4, type2_out* arg5) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, \
- type3_in, type1_out, type2_out, \
- type3_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- const type3_in& arg3, type1_out* arg4, \
- type2_out* arg5, type3_out* arg6) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
- ID, \
- MakeRefTuple(arg1, arg2, arg3), \
- MakeRefTuple(*arg4, *arg5, *arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type1_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- const type3_in& arg3, const type4_in& arg4, \
- type1_out* arg6) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
- Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type1_out, \
- type2_out) \
- msg_class::msg_class(const type1_in& arg1, const type2_in& arg2, \
- const type3_in& arg3, const type4_in& arg4, \
- type1_out* arg5, type2_out* arg6) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, \
- type4_in>, \
- Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), \
- MakeRefTuple(*arg5, *arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \
- msg_class::msg_class(int routing_id) \
- : IPC::MessageWithReply<Tuple0, Tuple0>( \
- routing_id, ID, \
- MakeTuple(), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \
- msg_class::msg_class(int routing_id, type1_out* arg1) \
- : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \
- routing_id, ID, \
- MakeTuple(), MakeRefTuple(*arg1)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \
- msg_class::msg_class(int routing_id, type1_out* arg1, type2_out* arg2) \
- : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \
- routing_id, ID, \
- MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, \
- type3_out) \
- msg_class::msg_class(int routing_id, type1_out* arg1, type2_out* arg2, \
- type3_out* arg3) \
- : IPC::MessageWithReply<Tuple0, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \
- msg_class::msg_class(int routing_id, const type1_in& arg1) \
- : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \
- routing_id, ID, \
- MakeRefTuple(arg1), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- type1_out* arg2) \
- : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \
- routing_id, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, \
- type2_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- type1_out* arg2, type2_out* arg3) \
- : IPC::MessageWithReply<Tuple1<type1_in>, \
- Tuple2<type1_out&, type2_out&> >( \
- routing_id, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, \
- type2_out, type3_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- type1_out* arg2, type2_out* arg3, type3_out* arg4) \
- : IPC::MessageWithReply<Tuple1<type1_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, \
- type2_out, type3_out, type4_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- type1_out* arg2, type2_out* arg3, \
- type3_out* arg4, type4_out* arg5) \
- : IPC::MessageWithReply<Tuple1<type1_in>, \
- Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >( \
- routing_id, ID, MakeRefTuple(arg1), \
- MakeRefTuple(*arg2, *arg3, *arg4, *arg5)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \
- routing_id, ID, MakeRefTuple(arg1, arg2), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, \
- type1_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, type1_out* arg3) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple1<type1_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, \
- type1_out, type2_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, type1_out* arg3, \
- type2_out* arg4) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, \
- type1_out, type2_out, type3_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, type1_out* arg3, \
- type2_out* arg4, type3_out* arg5) \
- : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, \
- type3_in) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0>( \
- routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, \
- type3_in, type1_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- type1_out* arg4) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple1<type1_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, \
- type3_in, type1_out, type2_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- type1_out* arg4, type2_out* arg5) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, \
- type3_in, type1_out, type2_out, \
- type3_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- type1_out* arg4, type2_out* arg5, type3_out* arg6) \
- : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5, \
- *arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, \
- type3_in, type4_in) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, \
- type4_in>, Tuple0 >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type1_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, type1_out* arg6) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
- Tuple1<type1_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type1_out, \
- type2_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, type1_out* arg5, type2_out* arg6) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
- Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-
-#define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type1_out, \
- type2_out, type3_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, type1_out* arg5, \
- type2_out* arg6, type3_out* arg7) \
- : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4), \
- MakeRefTuple(*arg5, *arg6, *arg7)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type5_in) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, const type5_in& arg5) \
- : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, \
- type4_in, type5_in>, Tuple0 >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeTuple()) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type5_in, type1_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, const type5_in& arg5, \
- type1_out* arg6) \
- : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, \
- type4_in, type5_in>, Tuple1<type1_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4, arg5), \
- MakeRefTuple(*arg6)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type5_in, \
- type1_out, type2_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, const type4_in& arg5, \
- type1_out* arg6, type2_out* arg7) \
- : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, \
- type4_in, type5_in>, Tuple2<type1_out&, type2_out&> >( \
- routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5), \
- MakeRefTuple(*arg6, *arg7)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-#define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, \
- type3_in, type4_in, type5_in, \
- type1_out, type2_out, type3_out) \
- msg_class::msg_class(int routing_id, const type1_in& arg1, \
- const type2_in& arg2, const type3_in& arg3, \
- const type4_in& arg4, const type4_in& arg5, \
- type1_out* arg6, type2_out* arg7, \
- type3_out* arg8) \
- : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, \
- type4_in, type5_in>, \
- Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
- MakeRefTuple(arg1, arg2, arg3, arg4, arg5), \
- MakeRefTuple(*arg6, *arg7, *arg8)) {} \
- \
- IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
-
-// Trigger the header guard define in ipc_message_macros.h so we don't get
-// duplicate including when we include MESSAGES_INTERNAL_FILE again at the end
-// of this file.
-#define IPC_MESSAGE_MACROS_INCLUDE_BLOCK
-
-// Redefine MESSAGES_INTERNAL_FILE just for the header check in
-// ipc_messages_macros.h that happens before it breaks on the header guard.
-#define MESSAGES_INTERNAL_FILE MESSAGES_INTERNAL_IMPL_FILE
-
-// Include our INTERNAL file first to get the normal expansion.
-#include MESSAGES_INTERNAL_IMPL_FILE
-
-#endif // IPC_IPC_MESSAGE_IMPL_MACROS_H_
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 903d566..d14f545 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -79,9 +79,6 @@
#endif
-#if defined(IPC_MESSAGE_MACROS_ENUMS)
-#undef IPC_MESSAGE_MACROS_ENUMS
-
// Undefine the macros from the previous pass (if any).
#undef IPC_BEGIN_MESSAGES
@@ -141,6 +138,9 @@
#undef IPC_SYNC_MESSAGE_ROUTED5_2
#undef IPC_SYNC_MESSAGE_ROUTED5_3
+#if defined(IPC_MESSAGE_MACROS_ENUMS)
+#undef IPC_MESSAGE_MACROS_ENUMS
+
// We're using the lowest 16 bits of type for the message id, and the highest
// 16 bits for the channel type.
//
@@ -399,65 +399,6 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \
#elif defined(IPC_MESSAGE_MACROS_LOG)
#undef IPC_MESSAGE_MACROS_LOG
-
-// Undefine the macros from the previous pass (if any).
-#undef IPC_BEGIN_MESSAGES
-#undef IPC_END_MESSAGES
-#undef IPC_MESSAGE_CONTROL0
-#undef IPC_MESSAGE_CONTROL1
-#undef IPC_MESSAGE_CONTROL2
-#undef IPC_MESSAGE_CONTROL3
-#undef IPC_MESSAGE_CONTROL4
-#undef IPC_MESSAGE_CONTROL5
-#undef IPC_MESSAGE_ROUTED0
-#undef IPC_MESSAGE_ROUTED1
-#undef IPC_MESSAGE_ROUTED2
-#undef IPC_MESSAGE_ROUTED3
-#undef IPC_MESSAGE_ROUTED4
-#undef IPC_MESSAGE_ROUTED5
-#undef IPC_SYNC_MESSAGE_CONTROL0_0
-#undef IPC_SYNC_MESSAGE_CONTROL0_1
-#undef IPC_SYNC_MESSAGE_CONTROL0_2
-#undef IPC_SYNC_MESSAGE_CONTROL0_3
-#undef IPC_SYNC_MESSAGE_CONTROL1_0
-#undef IPC_SYNC_MESSAGE_CONTROL1_1
-#undef IPC_SYNC_MESSAGE_CONTROL1_2
-#undef IPC_SYNC_MESSAGE_CONTROL1_3
-#undef IPC_SYNC_MESSAGE_CONTROL2_0
-#undef IPC_SYNC_MESSAGE_CONTROL2_1
-#undef IPC_SYNC_MESSAGE_CONTROL2_2
-#undef IPC_SYNC_MESSAGE_CONTROL2_3
-#undef IPC_SYNC_MESSAGE_CONTROL3_1
-#undef IPC_SYNC_MESSAGE_CONTROL3_2
-#undef IPC_SYNC_MESSAGE_CONTROL3_3
-#undef IPC_SYNC_MESSAGE_CONTROL4_1
-#undef IPC_SYNC_MESSAGE_CONTROL4_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_0
-#undef IPC_SYNC_MESSAGE_ROUTED0_1
-#undef IPC_SYNC_MESSAGE_ROUTED0_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_0
-#undef IPC_SYNC_MESSAGE_ROUTED1_1
-#undef IPC_SYNC_MESSAGE_ROUTED1_2
-#undef IPC_SYNC_MESSAGE_ROUTED1_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_4
-#undef IPC_SYNC_MESSAGE_ROUTED2_0
-#undef IPC_SYNC_MESSAGE_ROUTED2_1
-#undef IPC_SYNC_MESSAGE_ROUTED2_2
-#undef IPC_SYNC_MESSAGE_ROUTED2_3
-#undef IPC_SYNC_MESSAGE_ROUTED3_0
-#undef IPC_SYNC_MESSAGE_ROUTED3_1
-#undef IPC_SYNC_MESSAGE_ROUTED3_2
-#undef IPC_SYNC_MESSAGE_ROUTED3_3
-#undef IPC_SYNC_MESSAGE_ROUTED4_0
-#undef IPC_SYNC_MESSAGE_ROUTED4_1
-#undef IPC_SYNC_MESSAGE_ROUTED4_2
-#undef IPC_SYNC_MESSAGE_ROUTED4_3
-#undef IPC_SYNC_MESSAGE_ROUTED5_0
-#undef IPC_SYNC_MESSAGE_ROUTED5_1
-#undef IPC_SYNC_MESSAGE_ROUTED5_2
-#undef IPC_SYNC_MESSAGE_ROUTED5_3
-
#ifndef IPC_LOG_TABLE_CREATED
#define IPC_LOG_TABLE_CREATED
typedef void (*LogFunction)(uint32 type,
@@ -660,65 +601,6 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#elif defined(IPC_MESSAGE_MACROS_CLASSES)
#undef IPC_MESSAGE_MACROS_CLASSES
-
-// Undefine the macros from the previous pass (if any).
-#undef IPC_BEGIN_MESSAGES
-#undef IPC_END_MESSAGES
-#undef IPC_MESSAGE_CONTROL0
-#undef IPC_MESSAGE_CONTROL1
-#undef IPC_MESSAGE_CONTROL2
-#undef IPC_MESSAGE_CONTROL3
-#undef IPC_MESSAGE_CONTROL4
-#undef IPC_MESSAGE_CONTROL5
-#undef IPC_MESSAGE_ROUTED0
-#undef IPC_MESSAGE_ROUTED1
-#undef IPC_MESSAGE_ROUTED2
-#undef IPC_MESSAGE_ROUTED3
-#undef IPC_MESSAGE_ROUTED4
-#undef IPC_MESSAGE_ROUTED5
-#undef IPC_SYNC_MESSAGE_CONTROL0_0
-#undef IPC_SYNC_MESSAGE_CONTROL0_1
-#undef IPC_SYNC_MESSAGE_CONTROL0_2
-#undef IPC_SYNC_MESSAGE_CONTROL0_3
-#undef IPC_SYNC_MESSAGE_CONTROL1_0
-#undef IPC_SYNC_MESSAGE_CONTROL1_1
-#undef IPC_SYNC_MESSAGE_CONTROL1_2
-#undef IPC_SYNC_MESSAGE_CONTROL1_3
-#undef IPC_SYNC_MESSAGE_CONTROL2_0
-#undef IPC_SYNC_MESSAGE_CONTROL2_1
-#undef IPC_SYNC_MESSAGE_CONTROL2_2
-#undef IPC_SYNC_MESSAGE_CONTROL2_3
-#undef IPC_SYNC_MESSAGE_CONTROL3_1
-#undef IPC_SYNC_MESSAGE_CONTROL3_2
-#undef IPC_SYNC_MESSAGE_CONTROL3_3
-#undef IPC_SYNC_MESSAGE_CONTROL4_1
-#undef IPC_SYNC_MESSAGE_CONTROL4_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_0
-#undef IPC_SYNC_MESSAGE_ROUTED0_1
-#undef IPC_SYNC_MESSAGE_ROUTED0_2
-#undef IPC_SYNC_MESSAGE_ROUTED0_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_0
-#undef IPC_SYNC_MESSAGE_ROUTED1_1
-#undef IPC_SYNC_MESSAGE_ROUTED1_2
-#undef IPC_SYNC_MESSAGE_ROUTED1_3
-#undef IPC_SYNC_MESSAGE_ROUTED1_4
-#undef IPC_SYNC_MESSAGE_ROUTED2_0
-#undef IPC_SYNC_MESSAGE_ROUTED2_1
-#undef IPC_SYNC_MESSAGE_ROUTED2_2
-#undef IPC_SYNC_MESSAGE_ROUTED2_3
-#undef IPC_SYNC_MESSAGE_ROUTED3_0
-#undef IPC_SYNC_MESSAGE_ROUTED3_1
-#undef IPC_SYNC_MESSAGE_ROUTED3_2
-#undef IPC_SYNC_MESSAGE_ROUTED3_3
-#undef IPC_SYNC_MESSAGE_ROUTED4_0
-#undef IPC_SYNC_MESSAGE_ROUTED4_1
-#undef IPC_SYNC_MESSAGE_ROUTED4_2
-#undef IPC_SYNC_MESSAGE_ROUTED4_3
-#undef IPC_SYNC_MESSAGE_ROUTED5_0
-#undef IPC_SYNC_MESSAGE_ROUTED5_1
-#undef IPC_SYNC_MESSAGE_ROUTED5_2
-#undef IPC_SYNC_MESSAGE_ROUTED5_3
-
#define IPC_BEGIN_MESSAGES(label)
#define IPC_END_MESSAGES(label)
@@ -734,52 +616,61 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_MESSAGE_CONTROL1(msg_class, type1) \
class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1& arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1& arg1) \
+ : IPC::MessageWithTuple< Tuple1<type1> >(MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1)) {} \
};
-#define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \
+#define IPC_MESSAGE_CONTROL2(msg_class, type1, type2) \
class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1& arg1, const type2& arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1& arg1, const type2& arg2) \
+ : IPC::MessageWithTuple< Tuple2<type1, type2> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2)) {} \
};
-#define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \
- class msg_class : \
- public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1& arg1, const type2& arg2, const type3& arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+#define IPC_MESSAGE_CONTROL3(msg_class, type1, type2, type3) \
+ class msg_class : \
+ public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1& arg1, const type2& arg2, const type3& arg3) \
+ : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2, arg3)) {} \
};
-#define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \
- class msg_class : \
+#define IPC_MESSAGE_CONTROL4(msg_class, type1, type2, type3, type4) \
+ class msg_class : \
public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \
- const type4& arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1& arg1, const type2& arg2, const type3& arg3, \
+ const type4& arg4) \
+ : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4)) {} \
};
#define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \
- class msg_class : \
+ class msg_class : \
public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4, const type5& arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1& arg1, const type2& arg2, \
+ const type3& arg3, const type4& arg4, const type5& arg5) \
+ : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \
};
#define IPC_MESSAGE_ROUTED0(msg_class) \
@@ -791,74 +682,75 @@ LogFunction g_log_function_mapping[LastMsgIndex];
};
#define IPC_MESSAGE_ROUTED1(msg_class, type1) \
- class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(int32 routing_id, const type1& arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ class msg_class : public IPC::MessageWithTuple< Tuple1<type1> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int32 routing_id, const type1& arg1) \
+ : IPC::MessageWithTuple< Tuple1<type1> >(routing_id, ID, \
+ MakeRefTuple(arg1)) {} \
};
-#define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \
- class msg_class \
- : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(int32 routing_id, const type1& arg1, const type2& arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+#define IPC_MESSAGE_ROUTED2(msg_class, type1, type2) \
+ class msg_class : public IPC::MessageWithTuple< Tuple2<type1, type2> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int32 routing_id, const type1& arg1, const type2& arg2) \
+ : IPC::MessageWithTuple< Tuple2<type1, type2> >( \
+ routing_id, ID, MakeRefTuple(arg1, arg2)) {} \
};
-#define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \
- class msg_class \
- : public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
- const type3& arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+#define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \
+ class msg_class : \
+ public IPC::MessageWithTuple< Tuple3<type1, type2, type3> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
+ const type3& arg3) \
+ : IPC::MessageWithTuple< Tuple3<type1, type2, type3> >( \
+ routing_id, ID, MakeRefTuple(arg1, arg2, arg3)) {} \
};
-#define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \
- class msg_class \
- : public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+#define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \
+ class msg_class : \
+ public IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
+ const type3& arg3, const type4& arg4) \
+ : IPC::MessageWithTuple< Tuple4<type1, type2, type3, type4> >( \
+ routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4)) {} \
};
#define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \
- class msg_class \
- : public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \
- type5> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
- const type3& arg3, const type4& arg4, const type5& arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ class msg_class : \
+ public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
+ const type3& arg3, const type4& arg4, const type5& arg5) \
+ : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \
+ routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class() \
+ : IPC::MessageWithReply<Tuple0, Tuple0 >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeTuple(), MakeTuple()) {} \
};
-#define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
+#define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(type1_out* arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(type1_out* arg1) \
+ : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeTuple(), MakeRefTuple(*arg1)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \
@@ -866,9 +758,11 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(type1_out* arg1, type2_out* arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(type1_out* arg1, type2_out* arg2) \
+ : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \
+ MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out) \
@@ -877,29 +771,33 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> >{ \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(type1_out* arg1, type2_out* arg2, type3_out* arg3) \
+ : IPC::MessageWithReply<Tuple0, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \
};
-#define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \
- class msg_class : \
- public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+#define IPC_SYNC_MESSAGE_CONTROL1_0(msg_class, type1_in) \
+ class msg_class : \
+ public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1_in& arg1) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1), MakeTuple()) {} \
};
-#define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \
- class msg_class : \
+#define IPC_SYNC_MESSAGE_CONTROL1_1(msg_class, type1_in, type1_out) \
+ class msg_class : \
public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, type1_out* arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1_in& arg1, type1_out* arg2) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL1_2(msg_class, type1_in, type1_out, type2_out) \
@@ -907,9 +805,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&> >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL1_3(msg_class, type1_in, type1_out, type2_out, type3_out) \
@@ -918,29 +817,33 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> >{ \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \
};
-#define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \
- class msg_class : \
+#define IPC_SYNC_MESSAGE_CONTROL2_0(msg_class, type1_in, type2_in) \
+ class msg_class : \
public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1_in& arg1, const type2_in& arg2) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL2_1(msg_class, type1_in, type2_in, type1_out) \
- class msg_class : \
+ class msg_class : \
public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> > { \
- public: \
- enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> >( \
+ MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL2_2(msg_class, type1_in, type2_in, type1_out, type2_out) \
@@ -949,9 +852,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
+ Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL2_3(msg_class, type1_in, type2_in, type1_out, type2_out, type3_out) \
@@ -960,9 +864,11 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4, type3_out* arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4, type3_out* arg5) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL3_1(msg_class, type1_in, type2_in, type3_in, type1_out) \
@@ -971,9 +877,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL3_2(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out) \
@@ -982,9 +889,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \
@@ -993,9 +901,11 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(MSG_ROUTING_CONTROL, \
+ ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5, *arg6)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \
@@ -1004,9 +914,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg6) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple1<type1_out&> >(MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \
};
#define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out) \
@@ -1015,27 +926,30 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple2<type1_out&, type2_out&> >(MSG_ROUTING_CONTROL, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {} \
};
-#define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \
- class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
+#define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \
+ class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, type1_out* arg1) \
+ : IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> >( \
+ routing_id, ID, \
+ MakeTuple(), MakeRefTuple(*arg1)) {} \
};
-#define IPC_SYNC_MESSAGE_ROUTED0_1(msg_class, type1_out) \
- class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > { \
+#define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \
+ class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, type1_out* arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id) \
+ : IPC::MessageWithReply<Tuple0, Tuple0 >( \
+ routing_id, ID, \
+ MakeTuple(), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED0_2(msg_class, type1_out, type2_out) \
@@ -1043,9 +957,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, type1_out* arg1, type2_out* arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, type1_out* arg1, type2_out* arg2) \
+ : IPC::MessageWithReply<Tuple0, Tuple2<type1_out&, type2_out&> >( \
+ routing_id, ID, \
+ MakeTuple(), MakeRefTuple(*arg1, *arg2)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED0_3(msg_class, type1_out, type2_out, type3_out) \
@@ -1054,9 +969,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> >{ \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, type1_out* arg1, type2_out* arg2, type3_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, type1_out* arg1, type2_out* arg2, type3_out* arg3) \
+ : IPC::MessageWithReply<Tuple0, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeTuple(), MakeRefTuple(*arg1, *arg2, *arg3)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED1_0(msg_class, type1_in) \
@@ -1064,9 +980,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple0 >( \
+ routing_id, ID, \
+ MakeRefTuple(arg1), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED1_1(msg_class, type1_in, type1_out) \
@@ -1074,9 +991,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, type1_out* arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, type1_out* arg2) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple1<type1_out&> >( \
+ routing_id, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED1_2(msg_class, type1_in, type1_out, type2_out) \
@@ -1084,9 +1002,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, Tuple2<type1_out&, type2_out&> >( \
+ routing_id, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, type3_out) \
@@ -1095,9 +1014,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> >{ \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, type3_out, type4_out) \
@@ -1106,9 +1026,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >{ \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4, type4_out* arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4, type4_out* arg5) \
+ : IPC::MessageWithReply<Tuple1<type1_in>, \
+ Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1), MakeRefTuple(*arg2, *arg3, *arg4, *arg5)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \
@@ -1116,9 +1037,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 >( \
+ routing_id, ID, \
+ MakeRefTuple(arg1, arg2), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED2_1(msg_class, type1_in, type2_in, type1_out) \
@@ -1126,9 +1048,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple1<type1_out&> >( \
+ routing_id, ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED2_2(msg_class, type1_in, type2_in, type1_out, type2_out) \
@@ -1137,9 +1060,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
+ Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED2_3(msg_class, type1_in, type2_in, type1_out, type2_out, type3_out) \
@@ -1148,9 +1072,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4, type3_out* arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, type1_out* arg3, type2_out* arg4, type3_out* arg5) \
+ : IPC::MessageWithReply<Tuple2<type1_in, type2_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2), MakeRefTuple(*arg3, *arg4, *arg5)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED3_0(msg_class, type1_in, type2_in, type3_in) \
@@ -1158,10 +1083,11 @@ LogFunction g_log_function_mapping[LastMsgIndex];
public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
- };
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, Tuple0>( \
+ routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeTuple()) {} \
+ };
#define IPC_SYNC_MESSAGE_ROUTED3_1(msg_class, type1_in, type2_in, type3_in, type1_out) \
class msg_class : \
@@ -1169,9 +1095,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple1<type1_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED3_2(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out) \
@@ -1180,9 +1107,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \
@@ -1191,9 +1119,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3), MakeRefTuple(*arg4, *arg5, *arg6)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type4_in) \
@@ -1202,9 +1131,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple0 >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \
@@ -1213,9 +1143,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg6) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple1<type1_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out) \
@@ -1224,9 +1155,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out, type3_out) \
@@ -1235,9 +1167,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_out* arg7); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_out* arg7) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type4_in, type5_in) \
@@ -1246,9 +1179,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple0 > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5) \
+ : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, type5_in>, \
+ Tuple0 >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeTuple()) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type4_in, type5_in, type1_out) \
@@ -1257,9 +1191,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple1<type1_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6) \
+ : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, type5_in>, \
+ Tuple1<type1_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type4_in, type5_in, type1_out, type2_out) \
@@ -1268,9 +1203,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple2<type1_out&, type2_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type2_out* arg7); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type2_out* arg7) \
+ : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, type5_in>, \
+ Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7)) {} \
};
#define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type4_in, type5_in, type1_out, type2_out, type3_out) \
@@ -1279,9 +1215,10 @@ LogFunction g_log_function_mapping[LastMsgIndex];
Tuple3<type1_out&, type2_out&, type3_out&> > { \
public: \
enum { ID = msg_class##__ID }; \
- msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type2_out* arg7, type3_out* arg8); \
- ~msg_class(); \
- static void Log(const Message* msg, std::wstring* l); \
+ msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type4_in& arg5, type1_out* arg6, type2_out* arg7, type3_out* arg8) \
+ : IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in, type5_in>, \
+ Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
+ MakeRefTuple(arg1, arg2, arg3, arg4, arg5), MakeRefTuple(*arg6, *arg7, *arg8)) {} \
};
#endif // #if defined()
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 93f192ed..41fbde7 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -4,16 +4,10 @@
#include "ipc/ipc_message_utils.h"
-#include "base/file_path.h"
#include "base/json/json_writer.h"
-#include "base/nullable_string16.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "base/values.h"
-#if defined(OS_POSIX)
-#include "ipc/file_descriptor_set_posix.h"
-#endif
-#include "ipc/ipc_channel_handle.h"
namespace IPC {
@@ -207,24 +201,6 @@ static bool ReadValue(const Message* m, void** iter, Value** value,
return true;
}
-
-void ParamTraits<base::Time>::Write(Message* m, const param_type& p) {
- ParamTraits<int64>::Write(m, p.ToInternalValue());
-}
-
-bool ParamTraits<base::Time>::Read(const Message* m, void** iter,
- param_type* r) {
- int64 value;
- if (!ParamTraits<int64>::Read(m, iter, &value))
- return false;
- *r = base::Time::FromInternalValue(value);
- return true;
-}
-
-void ParamTraits<base::Time>::Log(const param_type& p, std::wstring* l) {
- ParamTraits<int64>::Log(p.ToInternalValue(), l);
-}
-
void ParamTraits<DictionaryValue>::Write(Message* m, const param_type& p) {
WriteValue(m, &p, 0);
}
@@ -262,107 +238,4 @@ void ParamTraits<ListValue>::Log(const param_type& p, std::wstring* l) {
base::JSONWriter::Write(&p, false, &json);
l->append(UTF8ToWide(json));
}
-
-void ParamTraits<NullableString16>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.string());
- WriteParam(m, p.is_null());
-}
-
-bool ParamTraits<NullableString16>::Read(const Message* m, void** iter,
- param_type* r) {
- string16 string;
- if (!ReadParam(m, iter, &string))
- return false;
- bool is_null;
- if (!ReadParam(m, iter, &is_null))
- return false;
- *r = NullableString16(string, is_null);
- return true;
-}
-
-void ParamTraits<NullableString16>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.string(), l);
- l->append(L", ");
- LogParam(p.is_null(), l);
- l->append(L")");
-}
-
-void ParamTraits<FilePath>::Write(Message* m, const param_type& p) {
- ParamTraits<FilePath::StringType>::Write(m, p.value());
-}
-
-bool ParamTraits<FilePath>::Read(const Message* m, void** iter, param_type* r) {
- FilePath::StringType value;
- if (!ParamTraits<FilePath::StringType>::Read(m, iter, &value))
- return false;
- *r = FilePath(value);
- return true;
-}
-
-void ParamTraits<FilePath>::Log(const param_type& p, std::wstring* l) {
- ParamTraits<FilePath::StringType>::Log(p.value(), l);
-}
-
-#if defined(OS_POSIX)
-void ParamTraits<base::FileDescriptor>::Write(Message* m, const param_type& p) {
- const bool valid = p.fd >= 0;
- WriteParam(m, valid);
-
- if (valid) {
- if (!m->WriteFileDescriptor(p))
- NOTREACHED();
- }
-}
-
-bool ParamTraits<base::FileDescriptor>::Read(const Message* m, void** iter,
- param_type* r) {
- bool valid;
- if (!ReadParam(m, iter, &valid))
- return false;
-
- if (!valid) {
- r->fd = -1;
- r->auto_close = false;
- return true;
- }
-
- return m->ReadFileDescriptor(iter, r);
-}
-
-void ParamTraits<base::FileDescriptor>::Log(const param_type& p,
- std::wstring* l) {
- if (p.auto_close) {
- l->append(StringPrintf(L"FD(%d auto-close)", p.fd));
- } else {
- l->append(StringPrintf(L"FD(%d)", p.fd));
- }
-}
-#endif // defined(OS_POSIX)
-
-void ParamTraits<IPC::ChannelHandle>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.name);
-#if defined(OS_POSIX)
- WriteParam(m, p.socket);
-#endif
-}
-
-bool ParamTraits<IPC::ChannelHandle>::Read(const Message* m, void** iter,
- param_type* r) {
- return ReadParam(m, iter, &r->name)
-#if defined(OS_POSIX)
- && ReadParam(m, iter, &r->socket)
-#endif
- ;
-}
-
-void ParamTraits<IPC::ChannelHandle>::Log(const param_type& p,
- std::wstring* l) {
- l->append(ASCIIToWide(StringPrintf("ChannelHandle(%s", p.name.c_str())));
-#if defined(OS_POSIX)
- ParamTraits<base::FileDescriptor>::Log(p.socket, l);
-#endif
- l->append(L")");
-}
-
} // namespace IPC
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 05d3916..4667d4b 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -12,28 +12,21 @@
#include <map>
#include <set>
+#include "base/file_path.h"
#include "base/format_macros.h"
+#include "base/nullable_string16.h"
#include "base/string16.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/time.h"
#include "base/tuple.h"
#include "base/utf_string_conversions.h"
-#include "ipc/ipc_sync_message.h"
-
-#if defined(COMPILER_GCC)
-// GCC "helpfully" tries to inline template methods in release mode. Except we
-// want the majority of the template junk being expanded once in the
-// implementation file (and only provide the definitions in
-// ipc_message_utils_impl.h in those files) and exported, instead of expanded
-// at every call site. Special note: GCC happily accepts the attribute before
-// the method declaration, but only acts on it if it is after.
-#define IPC_MSG_NOINLINE __attribute__((noinline));
-#elif defined(COMPILER_MSVC)
-// MSVC++ doesn't do this.
-#define IPC_MSG_NOINLINE
-#else
-#error "Please add the noinline property for your new compiler here."
+#include "base/values.h"
+#if defined(OS_POSIX)
+#include "ipc/file_descriptor_set_posix.h"
#endif
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_sync_message.h"
// Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique
// base. Messages have unique IDs across channels in order for the IPC logging
@@ -74,20 +67,8 @@ enum IPCMessageStart {
LastMsgIndex
};
-class DictionaryValue;
-class FilePath;
-class ListValue;
-class NullableString16;
-
-namespace base {
-class Time;
-struct FileDescriptor;
-}
-
namespace IPC {
-struct ChannelHandle;
-
//-----------------------------------------------------------------------------
// An iterator class for reading the fields contained within a Message.
@@ -325,9 +306,19 @@ struct ParamTraits<wchar_t> {
template <>
struct ParamTraits<base::Time> {
typedef base::Time param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ ParamTraits<int64>::Write(m, p.ToInternalValue());
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int64 value;
+ if (!ParamTraits<int64>::Read(m, iter, &value))
+ return false;
+ *r = base::Time::FromInternalValue(value);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ ParamTraits<int64>::Log(p.ToInternalValue(), l);
+ }
};
#if defined(OS_WIN)
@@ -374,9 +365,6 @@ struct ParamTraits<MSG> {
return result;
}
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<MSG>");
- }
};
#endif // defined(OS_WIN)
@@ -610,9 +598,27 @@ struct ParamTraits<std::pair<A, B> > {
template <>
struct ParamTraits<NullableString16> {
typedef NullableString16 param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.string());
+ WriteParam(m, p.is_null());
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ string16 string;
+ if (!ReadParam(m, iter, &string))
+ return false;
+ bool is_null;
+ if (!ReadParam(m, iter, &is_null))
+ return false;
+ *r = NullableString16(string, is_null);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.string(), l);
+ l->append(L", ");
+ LogParam(p.is_null(), l);
+ l->append(L")");
+ }
};
// If WCHAR_T_IS_UTF16 is defined, then string16 is a std::wstring so we don't
@@ -703,9 +709,19 @@ struct ParamTraits<POINT> {
template <>
struct ParamTraits<FilePath> {
typedef FilePath param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ ParamTraits<FilePath::StringType>::Write(m, p.value());
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ FilePath::StringType value;
+ if (!ParamTraits<FilePath::StringType>::Read(m, iter, &value))
+ return false;
+ *r = FilePath(value);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ ParamTraits<FilePath::StringType>::Log(p.value(), l);
+ }
};
#if defined(OS_POSIX)
@@ -727,9 +743,35 @@ struct ParamTraits<FilePath> {
template<>
struct ParamTraits<base::FileDescriptor> {
typedef base::FileDescriptor param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ const bool valid = p.fd >= 0;
+ WriteParam(m, valid);
+
+ if (valid) {
+ if (!m->WriteFileDescriptor(p))
+ NOTREACHED();
+ }
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool valid;
+ if (!ReadParam(m, iter, &valid))
+ return false;
+
+ if (!valid) {
+ r->fd = -1;
+ r->auto_close = false;
+ return true;
+ }
+
+ return m->ReadFileDescriptor(iter, r);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ if (p.auto_close) {
+ l->append(StringPrintf(L"FD(%d auto-close)", p.fd));
+ } else {
+ l->append(StringPrintf(L"FD(%d)", p.fd));
+ }
+ }
};
#endif // defined(OS_POSIX)
@@ -739,9 +781,26 @@ struct ParamTraits<base::FileDescriptor> {
template<>
struct ParamTraits<IPC::ChannelHandle> {
typedef ChannelHandle param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
+#if defined(OS_POSIX)
+ WriteParam(m, p.socket);
+#endif
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return ReadParam(m, iter, &r->name)
+#if defined(OS_POSIX)
+ && ReadParam(m, iter, &r->socket)
+#endif
+ ;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(ASCIIToWide(StringPrintf("ChannelHandle(%s", p.name.c_str())));
+#if defined(OS_POSIX)
+ ParamTraits<base::FileDescriptor>::Log(p.socket, l);
+#endif
+ l->append(L")");
+ }
};
#if defined(OS_WIN)
@@ -967,15 +1026,20 @@ template <class ParamType>
class MessageWithTuple : public Message {
public:
typedef ParamType Param;
- typedef typename TupleTypes<ParamType>::ParamTuple RefParam;
+ typedef typename ParamType::ParamTuple RefParam;
- // The constructor and the Read() method's templated implementations are in
- // ipc_message_utils_impl.h. The subclass constructor and Log() methods call
- // the templated versions of these and make sure there are instantiations in
- // those translation units.
- MessageWithTuple(int32 routing_id, uint32 type, const RefParam& p);
+ MessageWithTuple(int32 routing_id, uint32 type, const RefParam& p)
+ : Message(routing_id, type, PRIORITY_NORMAL) {
+ WriteParam(this, p);
+ }
- static bool Read(const Message* msg, Param* p) IPC_MSG_NOINLINE;
+ static bool Read(const Message* msg, Param* p) {
+ void* iter = NULL;
+ if (ReadParam(msg, &iter, p))
+ return true;
+ NOTREACHED() << "Error deserializing message " << msg->type();
+ return false;
+ }
// Generic dispatcher. Should cover most cases.
template<class T, class Method>
@@ -1047,6 +1111,12 @@ class MessageWithTuple : public Message {
return false;
}
+ static void Log(const Message* msg, std::wstring* l) {
+ Param p;
+ if (Read(msg, &p))
+ LogParam(p, l);
+ }
+
// Functions used to do manual unpacking. Only used by the automation code,
// these should go away once that code uses SyncChannel.
template<typename TA, typename TB>
@@ -1096,54 +1166,8 @@ class MessageWithTuple : public Message {
}
};
-// defined in ipc_logging.cc
-void GenerateLogData(const std::string& channel, const Message& message,
- LogData* data);
-
-
-#if defined(IPC_MESSAGE_LOG_ENABLED)
-inline void AddOutputParamsToLog(const Message* msg, std::wstring* l) {
- const std::wstring& output_params = msg->output_params();
- if (!l->empty() && !output_params.empty())
- l->append(L", ");
-
- l->append(output_params);
-}
-
-template <class ReplyParamType>
-inline void LogReplyParamsToMessage(const ReplyParamType& reply_params,
- const Message* msg) {
- if (msg->received_time() != 0) {
- std::wstring output_params;
- LogParam(reply_params, &output_params);
- msg->set_output_params(output_params);
- }
-}
-
-inline void ConnectMessageAndReply(const Message* msg, Message* reply) {
- if (msg->sent_time()) {
- // Don't log the sync message after dispatch, as we don't have the
- // output parameters at that point. Instead, save its data and log it
- // with the outgoing reply message when it's sent.
- LogData* data = new LogData;
- GenerateLogData("", *msg, data);
- msg->set_dont_log();
- reply->set_sync_log_data(data);
- }
-}
-#else
-inline void AddOutputParamsToLog(const Message* msg, std::wstring* l) {}
-
-template <class ReplyParamType>
-inline void LogReplyParamsToMessage(const ReplyParamType& reply_params,
- const Message* msg) {}
-
-inline void ConnectMessageAndReply(const Message* msg, Message* reply) {}
-#endif
-
// This class assumes that its template argument is a RefTuple (a Tuple with
-// reference elements). This would go into ipc_message_utils_impl.h, but it is
-// also used by chrome_frame.
+// reference elements).
template <class RefTuple>
class ParamDeserializer : public MessageReplyDeserializer {
public:
@@ -1156,32 +1180,67 @@ class ParamDeserializer : public MessageReplyDeserializer {
RefTuple out_;
};
+// defined in ipc_logging.cc
+void GenerateLogData(const std::string& channel, const Message& message,
+ LogData* data);
+
// Used for synchronous messages.
template <class SendParamType, class ReplyParamType>
class MessageWithReply : public SyncMessage {
public:
typedef SendParamType SendParam;
- typedef typename TupleTypes<SendParam>::ParamTuple RefSendParam;
+ typedef typename SendParam::ParamTuple RefSendParam;
typedef ReplyParamType ReplyParam;
MessageWithReply(int32 routing_id, uint32 type,
- const RefSendParam& send, const ReplyParam& reply);
- static bool ReadSendParam(const Message* msg, SendParam* p) IPC_MSG_NOINLINE;
- static bool ReadReplyParam(
- const Message* msg,
- typename TupleTypes<ReplyParam>::ValueTuple* p) IPC_MSG_NOINLINE;
+ const RefSendParam& send, const ReplyParam& reply)
+ : SyncMessage(routing_id, type, PRIORITY_NORMAL,
+ new ParamDeserializer<ReplyParam>(reply)) {
+ WriteParam(this, send);
+ }
+
+ static void Log(const Message* msg, std::wstring* l) {
+ if (msg->is_sync()) {
+ SendParam p;
+ void* iter = SyncMessage::GetDataIterator(msg);
+ if (ReadParam(msg, &iter, &p))
+ LogParam(p, l);
+
+#if defined(IPC_MESSAGE_LOG_ENABLED)
+ const std::wstring& output_params = msg->output_params();
+ if (!l->empty() && !output_params.empty())
+ l->append(L", ");
+
+ l->append(output_params);
+#endif
+ } else {
+ // This is an outgoing reply. Now that we have the output parameters, we
+ // can finally log the message.
+ typename ReplyParam::ValueTuple p;
+ void* iter = SyncMessage::GetDataIterator(msg);
+ if (ReadParam(msg, &iter, &p))
+ LogParam(p, l);
+ }
+ }
template<class T, class Method>
static bool Dispatch(const Message* msg, T* obj, Method func) {
SendParam send_params;
+ void* iter = GetDataIterator(msg);
Message* reply = GenerateReply(msg);
bool error;
- if (ReadSendParam(msg, &send_params)) {
- typename TupleTypes<ReplyParam>::ValueTuple reply_params;
+ if (ReadParam(msg, &iter, &send_params)) {
+ typename ReplyParam::ValueTuple reply_params;
DispatchToMethod(obj, func, send_params, &reply_params);
WriteParam(reply, reply_params);
error = false;
- LogReplyParamsToMessage(reply_params, msg);
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ if (msg->received_time() != 0) {
+ std::wstring output_params;
+ LogParam(reply_params, &output_params);
+ msg->set_output_params(output_params);
+ }
+#endif
} else {
NOTREACHED() << "Error deserializing message " << msg->type();
reply->set_reply_error();
@@ -1195,11 +1254,23 @@ class MessageWithReply : public SyncMessage {
template<class T, class Method>
static bool DispatchDelayReply(const Message* msg, T* obj, Method func) {
SendParam send_params;
+ void* iter = GetDataIterator(msg);
Message* reply = GenerateReply(msg);
bool error;
- if (ReadSendParam(msg, &send_params)) {
+ if (ReadParam(msg, &iter, &send_params)) {
Tuple1<Message&> t = MakeRefTuple(*reply);
- ConnectMessageAndReply(msg, reply);
+
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ if (msg->sent_time()) {
+ // Don't log the sync message after dispatch, as we don't have the
+ // output parameters at that point. Instead, save its data and log it
+ // with the outgoing reply message when it's sent.
+ LogData* data = new LogData;
+ GenerateLogData("", *msg, data);
+ msg->set_dont_log();
+ reply->set_sync_log_data(data);
+ }
+#endif
DispatchToMethod(obj, func, send_params, &t);
error = false;
} else {
diff --git a/ipc/ipc_message_utils_impl.h b/ipc/ipc_message_utils_impl.h
deleted file mode 100644
index 715df8f..0000000
--- a/ipc/ipc_message_utils_impl.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2010 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.
-//
-// This file contains templates forward declared (but not defined) in
-// ipc_message_utils.h so that they are only instantiated in certain files,
-// notably ipc_message_impl_macros.h and a few IPC unit tests.
-
-#ifndef IPC_IPC_MESSAGE_UTILS_IMPL_H_
-#define IPC_IPC_MESSAGE_UTILS_IMPL_H_
-
-namespace IPC {
-
-template <class ParamType>
-MessageWithTuple<ParamType>::MessageWithTuple(
- int32 routing_id, uint32 type, const RefParam& p)
- : Message(routing_id, type, PRIORITY_NORMAL) {
- WriteParam(this, p);
-}
-
-template <class ParamType>
-bool MessageWithTuple<ParamType>::Read(const Message* msg, Param* p) {
- void* iter = NULL;
- if (ReadParam(msg, &iter, p))
- return true;
- NOTREACHED() << "Error deserializing message " << msg->type();
- return false;
-}
-
-// We can't migrate the template for Log() to MessageWithTuple, because each
-// subclass needs to have Log() to call Read(), which instantiates the above
-// template.
-
-template <class SendParamType, class ReplyParamType>
-MessageWithReply<SendParamType, ReplyParamType>::MessageWithReply(
- int32 routing_id, uint32 type,
- const RefSendParam& send,
- const ReplyParam& reply)
- : SyncMessage(routing_id, type, PRIORITY_NORMAL,
- new ParamDeserializer<ReplyParam>(reply)) {
- WriteParam(this, send);
-}
-
-template <class SendParamType, class ReplyParamType>
-bool MessageWithReply<SendParamType, ReplyParamType>::ReadSendParam(
- const Message* msg, SendParam* p) {
- void* iter = SyncMessage::GetDataIterator(msg);
- return ReadParam(msg, &iter, p);
-}
-
-template <class SendParamType, class ReplyParamType>
-bool MessageWithReply<SendParamType, ReplyParamType>::ReadReplyParam(
- const Message* msg, typename TupleTypes<ReplyParam>::ValueTuple* p) {
- void* iter = SyncMessage::GetDataIterator(msg);
- return ReadParam(msg, &iter, p);
-}
-
-} // namespace IPC
-
-#endif // IPC_IPC_MESSAGE_UTILS_IMPL_H_
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index f6d315f..5f399da 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/ipc/ipc_send_fds_test.cc
@@ -20,7 +20,6 @@ extern "C" {
#include "ipc/ipc_message_utils.h"
#if defined(OS_POSIX)
-#include "base/file_descriptor_posix.h"
namespace {
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index a3b757a..87e9773 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -26,10 +26,6 @@
#define MESSAGES_INTERNAL_FILE "ipc/ipc_sync_message_unittest.h"
#include "ipc/ipc_message_macros.h"
-// Definition of IPC Messages used for this test.
-#define MESSAGES_INTERNAL_IMPL_FILE "ipc/ipc_sync_message_unittest.h"
-#include "ipc/ipc_message_impl_macros.h"
-
using namespace IPC;
using base::WaitableEvent;
diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc
index 5775d9b..d37247d 100644
--- a/ipc/sync_socket_unittest.cc
+++ b/ipc/sync_socket_unittest.cc
@@ -16,7 +16,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message_utils.h"
-#include "ipc/ipc_message_utils_impl.h"
#include "ipc/ipc_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
diff --git a/printing/pdf_ps_metafile_cairo.cc b/printing/pdf_ps_metafile_cairo.cc
index 798ee16..47f4c14 100644
--- a/printing/pdf_ps_metafile_cairo.cc
+++ b/printing/pdf_ps_metafile_cairo.cc
@@ -70,11 +70,6 @@ void DestroyContextData(void* data) {
namespace printing {
-PdfPsMetafile::PdfPsMetafile()
- : format_(PDF),
- surface_(NULL), context_(NULL) {
-}
-
PdfPsMetafile::PdfPsMetafile(const FileFormat& format)
: format_(format),
surface_(NULL), context_(NULL) {
diff --git a/printing/pdf_ps_metafile_cairo.h b/printing/pdf_ps_metafile_cairo.h
index e56b64c..7a7b470 100644
--- a/printing/pdf_ps_metafile_cairo.h
+++ b/printing/pdf_ps_metafile_cairo.h
@@ -29,8 +29,6 @@ class PdfPsMetafile {
PS,
};
- PdfPsMetafile();
-
// In the renderer process, callers should also call Init(void) to see if the
// metafile can obtain all necessary rendering resources.
// In the browser process, callers should also call Init(const void*, uint32)