From 1136a60c7d8e06859369f906e2581648e93e967e Mon Sep 17 00:00:00 2001 From: "brettw@google.com" Date: Mon, 26 Jan 2009 23:19:03 +0000 Subject: Make render_view_host compile on Mac & Linux, add to the build. Review URL: http://codereview.chromium.org/18600 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8672 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/render_messages.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'chrome/common/render_messages.h') diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index b0338b7..e279270ec 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -445,6 +445,18 @@ enum ViewHostMsg_ImeControl { IME_COMPLETE_COMPOSITION, }; +// This structure is passed around where we need a modal dialog event, which +// is currently not plumbed on Mac & Linux. +// +// TODO(port) Fix this. This structure should probably go away and we should +// do the modal dialog event in some portable way. If you remove this, be +// sure to also remove the ParamTraits for it below. +struct ModalDialogEvent { +#if defined(OS_WIN) + HANDLE event; +#endif +}; + // Multi-pass include of render_messages_internal. Preprocessor magic allows // us to use 1 header to define the enums and classes for our render messages. #define IPC_MESSAGE_MACROS_ENUMS @@ -1723,6 +1735,25 @@ struct ParamTraits { } }; +template<> +struct ParamTraits { + typedef ModalDialogEvent param_type; +#if defined(OS_WIN) + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.event); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->event); + } +#else + static void Write(Message* m, const param_type& p) { + } + static bool Read(const Message* m, void** iter, param_type* p) { + return true; + } +#endif +}; + } // namespace IPC #endif // CHROME_COMMON_RENDER_MESSAGES_H_ -- cgit v1.1