OLD | NEW |
1 // Copyright (c) 2009 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_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 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 #include <string> | 11 #include <string> |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class WaitableEvent; | 16 class WaitableEvent; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 MessageReplyDeserializer* deserializer_; | 78 MessageReplyDeserializer* deserializer_; |
79 base::WaitableEvent* pump_messages_event_; | 79 base::WaitableEvent* pump_messages_event_; |
80 | 80 |
81 static uint32 next_id_; // for generation of unique ids | 81 static uint32 next_id_; // for generation of unique ids |
82 }; | 82 }; |
83 | 83 |
84 // Used to deserialize parameters from a reply to a synchronous message | 84 // Used to deserialize parameters from a reply to a synchronous message |
85 class MessageReplyDeserializer { | 85 class MessageReplyDeserializer { |
86 public: | 86 public: |
87 virtual ~MessageReplyDeserializer() {} | |
88 bool SerializeOutputParameters(const Message& msg); | 87 bool SerializeOutputParameters(const Message& msg); |
89 private: | 88 private: |
90 // Derived classes need to implement this, using the given iterator (which | 89 // Derived classes need to implement this, using the given iterator (which |
91 // is skipped past the header for synchronous messages). | 90 // is skipped past the header for synchronous messages). |
92 virtual bool SerializeOutputParameters(const Message& msg, void* iter) = 0; | 91 virtual bool SerializeOutputParameters(const Message& msg, void* iter) = 0; |
93 }; | 92 }; |
94 | 93 |
95 } // namespace IPC | 94 } // namespace IPC |
96 | 95 |
97 #endif // IPC_IPC_SYNC_MESSAGE_H_ | 96 #endif // IPC_IPC_SYNC_MESSAGE_H__ |
OLD | NEW |