OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ |
6 #define MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ | 6 #define MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 ScopedPlatformHandle PassServerHandle(); | 63 ScopedPlatformHandle PassServerHandle(); |
64 | 64 |
65 // For in-process use (e.g., in tests or to pass over another channel). | 65 // For in-process use (e.g., in tests or to pass over another channel). |
66 ScopedPlatformHandle PassClientHandle(); | 66 ScopedPlatformHandle PassClientHandle(); |
67 | 67 |
68 // To be called in the child process, after the parent process called | 68 // To be called in the child process, after the parent process called |
69 // |PrepareToPassClientHandleToChildProcess()| and launched the child (using | 69 // |PrepareToPassClientHandleToChildProcess()| and launched the child (using |
70 // the provided data), to create a client handle connected to the server | 70 // the provided data), to create a client handle connected to the server |
71 // handle (in the parent process). | 71 // handle (in the parent process). |
| 72 // TODO(jcivelli): remove the command_line param. http://crbug.com/670106 |
72 static ScopedPlatformHandle PassClientHandleFromParentProcess( | 73 static ScopedPlatformHandle PassClientHandleFromParentProcess( |
73 const base::CommandLine& command_line); | 74 const base::CommandLine& command_line); |
74 | 75 |
75 // Like above, but gets the handle from the passed in string. | 76 // Like above, but gets the handle from the passed in string. |
76 static ScopedPlatformHandle PassClientHandleFromParentProcessFromString( | 77 static ScopedPlatformHandle PassClientHandleFromParentProcessFromString( |
77 const std::string& value); | 78 const std::string& value); |
78 | 79 |
79 // Prepares to pass the client channel to a new child process, to be launched | 80 // Prepares to pass the client channel to a new child process, to be launched |
80 // using |LaunchProcess()| (from base/launch.h). Modifies |*command_line| and | 81 // using |LaunchProcess()| (from base/launch.h). Modifies |*command_line| and |
81 // |*handle_passing_info| as needed. | 82 // |*handle_passing_info| as needed. |
(...skipping 14 matching lines...) Expand all Loading... |
96 ScopedPlatformHandle server_handle_; | 97 ScopedPlatformHandle server_handle_; |
97 ScopedPlatformHandle client_handle_; | 98 ScopedPlatformHandle client_handle_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(PlatformChannelPair); | 100 DISALLOW_COPY_AND_ASSIGN(PlatformChannelPair); |
100 }; | 101 }; |
101 | 102 |
102 } // namespace edk | 103 } // namespace edk |
103 } // namespace mojo | 104 } // namespace mojo |
104 | 105 |
105 #endif // MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ | 106 #endif // MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ |
OLD | NEW |