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 SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ | 5 #ifndef SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ |
6 #define SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ | 6 #define SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 bool MakeEvents(base::win::ScopedHandle* server_ping, | 67 bool MakeEvents(base::win::ScopedHandle* server_ping, |
68 base::win::ScopedHandle* server_pong, | 68 base::win::ScopedHandle* server_pong, |
69 HANDLE* client_ping, HANDLE* client_pong); | 69 HANDLE* client_ping, HANDLE* client_pong); |
70 | 70 |
71 // A copy this structure is maintained per channel. | 71 // A copy this structure is maintained per channel. |
72 // Note that a lot of the fields are just the same of what we have in the IPC | 72 // Note that a lot of the fields are just the same of what we have in the IPC |
73 // object itself. It is better to have the copies since we can dispatch in the | 73 // object itself. It is better to have the copies since we can dispatch in the |
74 // static method without worrying about converting back to a member function | 74 // static method without worrying about converting back to a member function |
75 // call or about threading issues. | 75 // call or about threading issues. |
76 struct ServerControl { | 76 struct ServerControl { |
| 77 ServerControl(); |
| 78 ~ServerControl(); |
| 79 |
77 // This channel server ping event. | 80 // This channel server ping event. |
78 base::win::ScopedHandle ping_event; | 81 base::win::ScopedHandle ping_event; |
79 // This channel server pong event. | 82 // This channel server pong event. |
80 base::win::ScopedHandle pong_event; | 83 base::win::ScopedHandle pong_event; |
81 // The size of this channel. | 84 // The size of this channel. |
82 uint32 channel_size; | 85 uint32 channel_size; |
83 // The pointer to the actual channel data. | 86 // The pointer to the actual channel data. |
84 char* channel_buffer; | 87 char* channel_buffer; |
85 // The pointer to the base of the shared memory. | 88 // The pointer to the base of the shared memory. |
86 char* shared_base; | 89 char* shared_base; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 123 |
121 // The dispatcher handles 'ready' IPC calls. | 124 // The dispatcher handles 'ready' IPC calls. |
122 Dispatcher* call_dispatcher_; | 125 Dispatcher* call_dispatcher_; |
123 | 126 |
124 DISALLOW_COPY_AND_ASSIGN(SharedMemIPCServer); | 127 DISALLOW_COPY_AND_ASSIGN(SharedMemIPCServer); |
125 }; | 128 }; |
126 | 129 |
127 } // namespace sandbox | 130 } // namespace sandbox |
128 | 131 |
129 #endif // SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ | 132 #endif // SANDBOX_SRC_SHAREDMEM_IPC_SERVER_H_ |
OLD | NEW |