[email protected] | 8e9ba76 | 2014-05-21 16:39:18 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ipc/ipc_message_macros.h" |
| 6 | |
| 7 | // Singly-included section for enums and custom IPC traits. |
| 8 | #ifndef IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ |
| 9 | #define IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ |
| 10 | |
| 11 | class BadType { |
| 12 | public: |
| 13 | BadType() {} |
| 14 | }; |
| 15 | |
| 16 | namespace IPC { |
| 17 | |
| 18 | template <> |
| 19 | struct ParamTraits<BadType> { |
rockot | 502c94f | 2016-02-03 20:20:16 | [diff] [blame] | 20 | static void Write(base::Pickle* m, const BadType& p) {} |
| 21 | static bool Read(const base::Pickle* m, |
| 22 | base::PickleIterator* iter, |
| 23 | BadType* r) { |
[email protected] | 8e9ba76 | 2014-05-21 16:39:18 | [diff] [blame] | 24 | return false; |
| 25 | } |
| 26 | static void Log(const BadType& p, std::string* l) {} |
| 27 | }; |
| 28 | |
| 29 | } |
| 30 | |
| 31 | #endif // IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ |
| 32 | |
Noel Gordon | 93d53af | 2017-07-06 12:48:08 | [diff] [blame] | 33 | #undef IPC_MESSAGE_START |
[email protected] | 8e9ba76 | 2014-05-21 16:39:18 | [diff] [blame] | 34 | #define IPC_MESSAGE_START TestMsgStart |
| 35 | IPC_MESSAGE_CONTROL0(TestMsg_Bounce) |
| 36 | IPC_MESSAGE_CONTROL0(TestMsg_SendBadMessage) |
| 37 | IPC_MESSAGE_CONTROL1(TestMsg_BadMessage, BadType) |
| 38 | |
| 39 | #undef IPC_MESSAGE_START |
Noel Gordon | 93d53af | 2017-07-06 12:48:08 | [diff] [blame] | 40 | #define IPC_MESSAGE_START AutomationMsgStart |
| 41 | IPC_MESSAGE_CONTROL0(AutomationMsg_Bounce) |
[email protected] | 8e9ba76 | 2014-05-21 16:39:18 | [diff] [blame] | 42 | |
| 43 | #undef IPC_MESSAGE_START |
| 44 | #define IPC_MESSAGE_START WorkerMsgStart |
| 45 | IPC_MESSAGE_CONTROL0(WorkerMsg_Bounce) |
| 46 | IPC_MESSAGE_CONTROL0(WorkerMsg_Quit) |