| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ | 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ |
| 6 #define IPC_IPC_MESSAGE_UTILS_H_ | 6 #define IPC_IPC_MESSAGE_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 PluginHostMsgStart, | 38 PluginHostMsgStart, |
| 39 NPObjectMsgStart, | 39 NPObjectMsgStart, |
| 40 TestMsgStart, | 40 TestMsgStart, |
| 41 DevToolsAgentMsgStart, | 41 DevToolsAgentMsgStart, |
| 42 DevToolsClientMsgStart, | 42 DevToolsClientMsgStart, |
| 43 WorkerProcessMsgStart, | 43 WorkerProcessMsgStart, |
| 44 WorkerProcessHostMsgStart, | 44 WorkerProcessHostMsgStart, |
| 45 WorkerMsgStart, | 45 WorkerMsgStart, |
| 46 WorkerHostMsgStart, | 46 WorkerHostMsgStart, |
| 47 NaClProcessMsgStart, | 47 NaClProcessMsgStart, |
| 48 //CommandBufferMsgStart, | 48 CommandBufferMsgStart, |
| 49 // NOTE: When you add a new message class, also update | 49 // NOTE: When you add a new message class, also update |
| 50 // IPCStatusView::IPCStatusView to ensure logging works. | 50 // IPCStatusView::IPCStatusView to ensure logging works. |
| 51 LastMsgIndex | 51 LastMsgIndex |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 COMPILE_ASSERT(LastMsgIndex <= 16, need_to_update_IPC_MESSAGE_MACRO); | |
| 55 | |
| 56 | |
| 57 namespace IPC { | 54 namespace IPC { |
| 58 | 55 |
| 59 //----------------------------------------------------------------------------- | 56 //----------------------------------------------------------------------------- |
| 60 // An iterator class for reading the fields contained within a Message. | 57 // An iterator class for reading the fields contained within a Message. |
| 61 | 58 |
| 62 class MessageIterator { | 59 class MessageIterator { |
| 63 public: | 60 public: |
| 64 explicit MessageIterator(const Message& m) : msg_(m), iter_(NULL) { | 61 explicit MessageIterator(const Message& m) : msg_(m), iter_(NULL) { |
| 65 } | 62 } |
| 66 int NextInt() const { | 63 int NextInt() const { |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 ReplyParam p(a, b, c, d, e); | 1256 ReplyParam p(a, b, c, d, e); |
| 1260 WriteParam(reply, p); | 1257 WriteParam(reply, p); |
| 1261 } | 1258 } |
| 1262 }; | 1259 }; |
| 1263 | 1260 |
| 1264 //----------------------------------------------------------------------------- | 1261 //----------------------------------------------------------------------------- |
| 1265 | 1262 |
| 1266 } // namespace IPC | 1263 } // namespace IPC |
| 1267 | 1264 |
| 1268 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1265 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |