OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "mojo/edk/test/multiprocess_test_helper.h" | 5 #include "mojo/edk/test/multiprocess_test_helper.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/process/kill.h" | 11 #include "base/process/kill.h" |
12 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "mojo/edk/embedder/embedder.h" | 14 #include "mojo/edk/embedder/embedder.h" |
15 #include "mojo/edk/embedder/platform_channel_pair.h" | 15 #include "mojo/edk/embedder/platform_channel_pair.h" |
16 | 16 |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
19 #endif | 19 #endif |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 namespace edk { | 22 namespace edk { |
23 namespace test { | 23 namespace test { |
24 | 24 |
25 const char kBrokerHandleSwitch[] = "broker-handle"; | 25 const char kBrokerHandleSwitch[] = "broker-handle"; |
26 | 26 |
| 27 #if !defined(OS_IOS) |
| 28 |
27 MultiprocessTestHelper::MultiprocessTestHelper() { | 29 MultiprocessTestHelper::MultiprocessTestHelper() { |
28 platform_channel_pair_.reset(new PlatformChannelPair()); | 30 platform_channel_pair_.reset(new PlatformChannelPair()); |
29 server_platform_handle = platform_channel_pair_->PassServerHandle(); | 31 server_platform_handle = platform_channel_pair_->PassServerHandle(); |
30 broker_platform_channel_pair_.reset(new PlatformChannelPair()); | 32 broker_platform_channel_pair_.reset(new PlatformChannelPair()); |
31 } | 33 } |
32 | 34 |
33 MultiprocessTestHelper::~MultiprocessTestHelper() { | 35 MultiprocessTestHelper::~MultiprocessTestHelper() { |
34 CHECK(!test_child_.IsValid()); | 36 CHECK(!test_child_.IsValid()); |
35 server_platform_handle.reset(); | 37 server_platform_handle.reset(); |
36 platform_channel_pair_.reset(); | 38 platform_channel_pair_.reset(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 kBrokerHandleSwitch); | 120 kBrokerHandleSwitch); |
119 ScopedPlatformHandle broker_handle = | 121 ScopedPlatformHandle broker_handle = |
120 PlatformChannelPair::PassClientHandleFromParentProcessFromString( | 122 PlatformChannelPair::PassClientHandleFromParentProcessFromString( |
121 broker_handle_str); | 123 broker_handle_str); |
122 SetParentPipeHandle(std::move(broker_handle)); | 124 SetParentPipeHandle(std::move(broker_handle)); |
123 } | 125 } |
124 | 126 |
125 // static | 127 // static |
126 ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; | 128 ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; |
127 | 129 |
| 130 #endif // !defined(OS_IOS) |
| 131 |
128 } // namespace test | 132 } // namespace test |
129 } // namespace edk | 133 } // namespace edk |
130 } // namespace mojo | 134 } // namespace mojo |
OLD | NEW |