| 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_SYNC_MESSAGE_H_ | 5 #ifndef IPC_IPC_SYNC_MESSAGE_H_ |
| 6 #define IPC_IPC_SYNC_MESSAGE_H_ | 6 #define IPC_IPC_SYNC_MESSAGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 8 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 9 #include <windows.h> | 10 #include <windows.h> |
| 10 #endif | 11 #endif |
| 11 #include <string> | 12 #include <string> |
| 12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class WaitableEvent; | 18 class WaitableEvent; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace IPC { | 21 namespace IPC { |
| 21 | 22 |
| 22 class MessageReplyDeserializer; | 23 class MessageReplyDeserializer; |
| 23 | 24 |
| 24 class IPC_EXPORT SyncMessage : public Message { | 25 class IPC_EXPORT SyncMessage : public Message { |
| 25 public: | 26 public: |
| 26 SyncMessage(int32 routing_id, uint32 type, PriorityValue priority, | 27 SyncMessage(int32_t routing_id, |
| 28 uint32_t type, |
| 29 PriorityValue priority, |
| 27 MessageReplyDeserializer* deserializer); | 30 MessageReplyDeserializer* deserializer); |
| 28 ~SyncMessage() override; | 31 ~SyncMessage() override; |
| 29 | 32 |
| 30 // Call this to get a deserializer for the output parameters. | 33 // Call this to get a deserializer for the output parameters. |
| 31 // Note that this can only be called once, and the caller is responsible | 34 // Note that this can only be called once, and the caller is responsible |
| 32 // for deleting the deserializer when they're done. | 35 // for deleting the deserializer when they're done. |
| 33 MessageReplyDeserializer* GetReplyDeserializer(); | 36 MessageReplyDeserializer* GetReplyDeserializer(); |
| 34 | 37 |
| 35 // If this message can cause the receiver to block while waiting for user | 38 // If this message can cause the receiver to block while waiting for user |
| 36 // input (i.e. by calling MessageBox), then the caller needs to pump window | 39 // input (i.e. by calling MessageBox), then the caller needs to pump window |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 : id(id), deserializer(d), done_event(e), send_result(false) { } | 105 : id(id), deserializer(d), done_event(e), send_result(false) { } |
| 103 int id; | 106 int id; |
| 104 MessageReplyDeserializer* deserializer; | 107 MessageReplyDeserializer* deserializer; |
| 105 base::WaitableEvent* done_event; | 108 base::WaitableEvent* done_event; |
| 106 bool send_result; | 109 bool send_result; |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 } // namespace IPC | 112 } // namespace IPC |
| 110 | 113 |
| 111 #endif // IPC_IPC_SYNC_MESSAGE_H_ | 114 #endif // IPC_IPC_SYNC_MESSAGE_H_ |
| OLD | NEW |