OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_H__ | 5 #ifndef IPC_IPC_MESSAGE_H__ |
6 #define IPC_IPC_MESSAGE_H__ | 6 #define IPC_IPC_MESSAGE_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 | 151 |
152 template<class T> | 152 template<class T> |
153 static bool Dispatch(const Message* msg, T* obj, | 153 static bool Dispatch(const Message* msg, T* obj, |
154 void (T::*func)(const Message&) const) { | 154 void (T::*func)(const Message&) const) { |
155 (obj->*func)(*msg); | 155 (obj->*func)(*msg); |
156 return true; | 156 return true; |
157 } | 157 } |
158 | 158 |
159 // Used for async messages with no parameters. | 159 // Used for async messages with no parameters. |
160 static void Log(const Message* msg, std::string* l) { | 160 static void Log(std::string* name, const Message* msg, std::string* l) { |
161 } | 161 } |
162 | 162 |
163 // Find the end of the message data that starts at range_start. Returns NULL | 163 // Find the end of the message data that starts at range_start. Returns NULL |
164 // if the entire message is not found in the given data range. | 164 // if the entire message is not found in the given data range. |
165 static const char* FindNext(const char* range_start, const char* range_end) { | 165 static const char* FindNext(const char* range_start, const char* range_end) { |
166 return Pickle::FindNext(sizeof(Header), range_start, range_end); | 166 return Pickle::FindNext(sizeof(Header), range_start, range_end); |
167 } | 167 } |
168 | 168 |
169 #if defined(OS_POSIX) | 169 #if defined(OS_POSIX) |
170 // On POSIX, a message supports reading / writing FileDescriptor objects. | 170 // On POSIX, a message supports reading / writing FileDescriptor objects. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 MSG_ROUTING_NONE = -2, | 272 MSG_ROUTING_NONE = -2, |
273 | 273 |
274 // indicates a general message not sent to a particular tab. | 274 // indicates a general message not sent to a particular tab. |
275 MSG_ROUTING_CONTROL = kint32max, | 275 MSG_ROUTING_CONTROL = kint32max, |
276 }; | 276 }; |
277 | 277 |
278 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies | 278 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies |
279 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging | 279 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging |
280 | 280 |
281 #endif // IPC_IPC_MESSAGE_H__ | 281 #endif // IPC_IPC_MESSAGE_H__ |
OLD | NEW |