| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ | 5 #ifndef SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ |
| 6 #define SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ | 6 #define SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "services/shell/public/interfaces/shell_client.mojom.h" | 10 #include "services/shell/public/interfaces/shell_client.mojom.h" |
| 9 | 11 |
| 10 namespace base { | 12 namespace base { |
| 11 class CommandLine; | 13 class CommandLine; |
| 12 } | 14 } |
| 13 | 15 |
| 14 namespace shell { | 16 namespace shell { |
| 15 | 17 |
| 16 // Creates a new ShellClient pipe and returns one end of it. The other end is | 18 // Creates a new ShellClient pipe and returns one end of it. The other end is |
| 17 // passed via a token in |command_line|. A child of the calling process may | 19 // passed via a token in |command_line|. A child of the calling process may |
| 18 // extract a ShellClientRequest from this by calling | 20 // extract a ShellClientRequest from this by calling |
| 19 // GetShellClientRequestFromCommandLine(). | 21 // GetShellClientRequestFromCommandLine(). |
| 20 mojom::ShellClientPtr PassShellClientRequestOnCommandLine( | 22 mojom::ShellClientPtr PassShellClientRequestOnCommandLine( |
| 21 base::CommandLine* command_line); | 23 base::CommandLine* command_line, const std::string& child_token); |
| 22 | 24 |
| 23 // Extracts a ShellClientRequest from the command line of the current process. | 25 // Extracts a ShellClientRequest from the command line of the current process. |
| 24 // The parent of this process should have passed a request using | 26 // The parent of this process should have passed a request using |
| 25 // PassShellClientRequestOnCommandLine(). | 27 // PassShellClientRequestOnCommandLine(). |
| 26 mojom::ShellClientRequest GetShellClientRequestFromCommandLine(); | 28 mojom::ShellClientRequest GetShellClientRequestFromCommandLine(); |
| 27 | 29 |
| 28 } // namespace shell | 30 } // namespace shell |
| 29 | 31 |
| 30 #endif // SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ | 32 #endif // SERVICES_SHELL_RUNNER_COMMON_CLIENT_UTIL_H_ |
| OLD | NEW |