| 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_HOST_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ |
| 6 #define MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ | 6 #define MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 base::ProcessId GetProcessId(); | 41 base::ProcessId GetProcessId(); |
| 42 | 42 |
| 43 // Sends a message to the child process to connect to |process_id| via |pipe|. | 43 // Sends a message to the child process to connect to |process_id| via |pipe|. |
| 44 void ConnectToProcess(base::ProcessId process_id, ScopedPlatformHandle pipe); | 44 void ConnectToProcess(base::ProcessId process_id, ScopedPlatformHandle pipe); |
| 45 | 45 |
| 46 // Sends a message to the child process that |pipe_id|'s other end is in | 46 // Sends a message to the child process that |pipe_id|'s other end is in |
| 47 // |process_id|. If the other end is in this parent process, |process_id| will | 47 // |process_id|. If the other end is in this parent process, |process_id| will |
| 48 // be 0. | 48 // be 0. |
| 49 void ConnectMessagePipe(uint64_t pipe_id, base::ProcessId process_id); | 49 void ConnectMessagePipe(uint64_t pipe_id, base::ProcessId process_id); |
| 50 | 50 |
| 51 // Sends a message to the child process informing it that the peer process has |
| 52 // died before it could connect. |
| 53 void PeerDied(uint64_t pipe_id); |
| 54 |
| 51 RoutedRawChannel* channel() { return child_channel_; } | 55 RoutedRawChannel* channel() { return child_channel_; } |
| 52 | 56 |
| 53 private: | 57 private: |
| 54 ~ChildBrokerHost() override; | 58 ~ChildBrokerHost() override; |
| 55 | 59 |
| 56 void InitOnIO(ScopedPlatformHandle parent_async_channel_handle); | 60 void InitOnIO(ScopedPlatformHandle parent_async_channel_handle); |
| 57 | 61 |
| 58 // RawChannel::Delegate implementation: | 62 // RawChannel::Delegate implementation: |
| 59 void OnReadMessage( | 63 void OnReadMessage( |
| 60 const MessageInTransit::View& message_view, | 64 const MessageInTransit::View& message_view, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 std::vector<char> write_data_; | 103 std::vector<char> write_data_; |
| 100 #endif | 104 #endif |
| 101 | 105 |
| 102 DISALLOW_COPY_AND_ASSIGN(ChildBrokerHost); | 106 DISALLOW_COPY_AND_ASSIGN(ChildBrokerHost); |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace edk | 109 } // namespace edk |
| 106 } // namespace mojo | 110 } // namespace mojo |
| 107 | 111 |
| 108 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ | 112 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ |
| OLD | NEW |