| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MOJO_EDK_SYSTEM_CHILD_BROKER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CHILD_BROKER_H_ |
| 6 #define MOJO_EDK_SYSTEM_CHILD_BROKER_H_ | 6 #define MOJO_EDK_SYSTEM_CHILD_BROKER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Callback for when a RoutedRawChannel is destroyed for cleanup. | 64 // Callback for when a RoutedRawChannel is destroyed for cleanup. |
| 65 void ChannelDestructed(RoutedRawChannel* channel); | 65 void ChannelDestructed(RoutedRawChannel* channel); |
| 66 | 66 |
| 67 // Sends a message over |parent_async_channel_|, queueing it if necessary. | 67 // Sends a message over |parent_async_channel_|, queueing it if necessary. |
| 68 void WriteAsyncMessage(scoped_ptr<MessageInTransit> message); | 68 void WriteAsyncMessage(scoped_ptr<MessageInTransit> message); |
| 69 | 69 |
| 70 // Initializes |parent_async_channel_|. | 70 // Initializes |parent_async_channel_|. |
| 71 void InitAsyncChannel(ScopedPlatformHandle parent_async_channel_handle); | 71 void InitAsyncChannel(ScopedPlatformHandle parent_async_channel_handle); |
| 72 | 72 |
| 73 // Helper method to connect the given MessagePipe to the channel. |
| 74 void AttachMessagePipe(MessagePipeDispatcher* message_pipe, |
| 75 uint64_t pipe_id, |
| 76 RoutedRawChannel* raw_channel); |
| 77 |
| 73 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
| 74 // Helper method to write the given message and read back the result. | 79 // Helper method to write the given message and read back the result. |
| 75 bool WriteAndReadResponse(BrokerMessage* message, | 80 bool WriteAndReadResponse(BrokerMessage* message, |
| 76 void* response, | 81 void* response, |
| 77 uint32_t response_size); | 82 uint32_t response_size); |
| 78 | 83 |
| 79 void CreatePlatformChannelPairNoLock(ScopedPlatformHandle* server, | 84 void CreatePlatformChannelPairNoLock(ScopedPlatformHandle* server, |
| 80 ScopedPlatformHandle* client); | 85 ScopedPlatformHandle* client); |
| 81 | 86 |
| 82 // Guards access to |parent_sync_channel_|. | 87 // Guards access to |parent_sync_channel_|. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 RoutedRawChannel* in_process_pipes_channel1_; | 139 RoutedRawChannel* in_process_pipes_channel1_; |
| 135 RoutedRawChannel* in_process_pipes_channel2_; | 140 RoutedRawChannel* in_process_pipes_channel2_; |
| 136 | 141 |
| 137 DISALLOW_COPY_AND_ASSIGN(ChildBroker); | 142 DISALLOW_COPY_AND_ASSIGN(ChildBroker); |
| 138 }; | 143 }; |
| 139 | 144 |
| 140 } // namespace edk | 145 } // namespace edk |
| 141 } // namespace mojo | 146 } // namespace mojo |
| 142 | 147 |
| 143 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_H_ | 148 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_H_ |
| OLD | NEW |