| 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 | |
| 73 static ScopedPlatformHandle PassClientHandleFromParentProcess( | 72 static ScopedPlatformHandle PassClientHandleFromParentProcess( |
| 74 const base::CommandLine& command_line); | 73 const base::CommandLine& command_line); |
| 75 | 74 |
| 76 // Like above, but gets the handle from the passed in string. | 75 // Like above, but gets the handle from the passed in string. |
| 77 static ScopedPlatformHandle PassClientHandleFromParentProcessFromString( | 76 static ScopedPlatformHandle PassClientHandleFromParentProcessFromString( |
| 78 const std::string& value); | 77 const std::string& value); |
| 79 | 78 |
| 80 // Prepares to pass the client channel to a new child process, to be launched | 79 // Prepares to pass the client channel to a new child process, to be launched |
| 81 // using |LaunchProcess()| (from base/launch.h). Modifies |*command_line| and | 80 // using |LaunchProcess()| (from base/launch.h). Modifies |*command_line| and |
| 82 // |*handle_passing_info| as needed. | 81 // |*handle_passing_info| as needed. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 97 ScopedPlatformHandle server_handle_; | 96 ScopedPlatformHandle server_handle_; |
| 98 ScopedPlatformHandle client_handle_; | 97 ScopedPlatformHandle client_handle_; |
| 99 | 98 |
| 100 DISALLOW_COPY_AND_ASSIGN(PlatformChannelPair); | 99 DISALLOW_COPY_AND_ASSIGN(PlatformChannelPair); |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 } // namespace edk | 102 } // namespace edk |
| 104 } // namespace mojo | 103 } // namespace mojo |
| 105 | 104 |
| 106 #endif // MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ | 105 #endif // MOJO_EDK_EMBEDDER_PLATFORM_CHANNEL_PAIR_H_ |
| OLD | NEW |