Index: content/public/common/common_param_traits.h |
diff --git a/content/public/common/common_param_traits.h b/content/public/common/common_param_traits.h |
index e3f5142a1d4caa681823dc331b024fca8d88d226..b96983a1f86b3f0e34afb6432748e70a7b30afa8 100644 |
--- a/content/public/common/common_param_traits.h |
+++ b/content/public/common/common_param_traits.h |
@@ -22,7 +22,9 @@ |
#include "build/build_config.h" |
#include "content/common/content_export.h" |
#include "content/public/common/common_param_traits_macros.h" |
+#include "content/public/common/input/scoped_web_input_event.h" |
#include "ipc/ipc_message_utils.h" |
+#include "third_party/WebKit/public/web/WebInputEvent.h" |
#include "ui/gfx/native_widget_types.h" |
#include "ui/surface/transport_dib.h" |
#include "url/gurl.h" |
@@ -124,6 +126,24 @@ struct ParamTraits<gfx::NativeWindow> { |
} |
}; |
+typedef const blink::WebInputEvent* WebInputEventPointer; |
+template <> |
+struct CONTENT_EXPORT ParamTraits<WebInputEventPointer> { |
+ typedef WebInputEventPointer param_type; |
+ static void Write(Message* m, const param_type& p); |
+ // Note: upon read, the event has the lifetime of the message. |
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
+ static void Log(const param_type& p, std::string* l); |
+}; |
+ |
+template <> |
+struct CONTENT_EXPORT ParamTraits<content::ScopedWebInputEvent> { |
+ typedef content::ScopedWebInputEvent param_type; |
+ static void Write(Message* m, const param_type& p); |
+ static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
+ static void Log(const param_type& p, std::string* l); |
+}; |
+ |
} // namespace IPC |
#endif // CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_H_ |