OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // reply message, so that when it's sent and we have the output parameters | 219 // reply message, so that when it's sent and we have the output parameters |
220 // we can log it. As such, we set a flag on the sent message to not log it. | 220 // we can log it. As such, we set a flag on the sent message to not log it. |
221 void set_sync_log_data(LogData* data) const { log_data_ = data; } | 221 void set_sync_log_data(LogData* data) const { log_data_ = data; } |
222 LogData* sync_log_data() const { return log_data_; } | 222 LogData* sync_log_data() const { return log_data_; } |
223 void set_dont_log() const { dont_log_ = true; } | 223 void set_dont_log() const { dont_log_ = true; } |
224 bool dont_log() const { return dont_log_; } | 224 bool dont_log() const { return dont_log_; } |
225 #endif | 225 #endif |
226 | 226 |
227 // Called at various points between send and receive to track message. | 227 // Called at various points between send and receive to track message. |
228 void TraceMessageStep() { | 228 void TraceMessageStep() { |
229 TRACE_EVENT_ASYNC_BEGIN_STEP0("ipc", "IPC", header()->flags, NULL); | 229 TRACE_EVENT_ASYNC_BEGIN_STEP0("ipc", "IPC", header()->flags, "step"); |
230 } | 230 } |
231 | 231 |
232 protected: | 232 protected: |
233 friend class Channel; | 233 friend class Channel; |
234 friend class MessageReplyDeserializer; | 234 friend class MessageReplyDeserializer; |
235 friend class SyncMessage; | 235 friend class SyncMessage; |
236 | 236 |
237 #pragma pack(push, 4) | 237 #pragma pack(push, 4) |
238 struct Header : Pickle::Header { | 238 struct Header : Pickle::Header { |
239 int32 routing; // ID of the view that this message is destined for | 239 int32 routing; // ID of the view that this message is destined for |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 MSG_ROUTING_NONE = -2, | 289 MSG_ROUTING_NONE = -2, |
290 | 290 |
291 // indicates a general message not sent to a particular tab. | 291 // indicates a general message not sent to a particular tab. |
292 MSG_ROUTING_CONTROL = kint32max, | 292 MSG_ROUTING_CONTROL = kint32max, |
293 }; | 293 }; |
294 | 294 |
295 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies | 295 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies |
296 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging | 296 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging |
297 | 297 |
298 #endif // IPC_IPC_MESSAGE_H_ | 298 #endif // IPC_IPC_MESSAGE_H_ |
OLD | NEW |