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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 #endif | 27 #endif |
28 public: | 28 public: |
29 // |child_process| is a handle to the child process. It's not owned by this | 29 // |child_process| is a handle to the child process. It's not owned by this |
30 // class but is guaranteed to be alive as long as the child process is | 30 // class but is guaranteed to be alive as long as the child process is |
31 // running. |pipe| is a handle to the communication pipe to the child process, | 31 // running. |pipe| is a handle to the communication pipe to the child process, |
32 // which is generated inside mojo::edk::ChildProcessLaunched. It is owned by | 32 // which is generated inside mojo::edk::ChildProcessLaunched. It is owned by |
33 // this class. | 33 // this class. |
34 ChildBrokerHost(base::ProcessHandle child_process, ScopedPlatformHandle pipe); | 34 ChildBrokerHost(base::ProcessHandle child_process, ScopedPlatformHandle pipe); |
35 | 35 |
36 private: | 36 private: |
37 #if defined(OS_WIN) | |
38 ~ChildBrokerHost() override; | |
39 #else | |
37 virtual ~ChildBrokerHost(); | 40 virtual ~ChildBrokerHost(); |
jam
2015/11/25 22:03:47
no need for virtual actually
| |
41 #endif | |
38 | 42 |
39 void RegisterIOHandler(); | 43 void RegisterIOHandler(); |
40 void BeginRead(); | 44 void BeginRead(); |
41 | 45 |
42 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
43 void OnIOCompleted(base::MessageLoopForIO::IOContext* context, | 47 void OnIOCompleted(base::MessageLoopForIO::IOContext* context, |
44 DWORD bytes_transferred, | 48 DWORD bytes_transferred, |
45 DWORD error) override; | 49 DWORD error) override; |
46 | 50 |
47 // Helper wrappers around DuplicateHandle. | 51 // Helper wrappers around DuplicateHandle. |
(...skipping 12 matching lines...) Expand all Loading... | |
60 std::vector<char> read_data_; | 64 std::vector<char> read_data_; |
61 // How many bytes in read_data_ we already read. | 65 // How many bytes in read_data_ we already read. |
62 uint32_t num_bytes_read_; | 66 uint32_t num_bytes_read_; |
63 std::vector<char> write_data_; | 67 std::vector<char> write_data_; |
64 }; | 68 }; |
65 | 69 |
66 } // namespace edk | 70 } // namespace edk |
67 } // namespace mojo | 71 } // namespace mojo |
68 | 72 |
69 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ | 73 #endif // MOJO_EDK_SYSTEM_CHILD_BROKER_HOST_H_ |
OLD | NEW |