Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file implements the common entry point shared by all Chromoting Host | 5 // This file implements the common entry point shared by all Chromoting Host |
| 6 // processes. | 6 // processes. |
| 7 | 7 |
| 8 #include "remoting/host/host_main.h" | 8 #include "remoting/host/host_main.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 const char kHelpSwitchName[] = "help"; | 62 const char kHelpSwitchName[] = "help"; |
| 63 const char kQuestionSwitchName[] = "?"; | 63 const char kQuestionSwitchName[] = "?"; |
| 64 | 64 |
| 65 // The command line switch used to get version of the daemon. | 65 // The command line switch used to get version of the daemon. |
| 66 const char kVersionSwitchName[] = "version"; | 66 const char kVersionSwitchName[] = "version"; |
| 67 | 67 |
| 68 const char kUsageMessage[] = | 68 const char kUsageMessage[] = |
| 69 "Usage: %s [options]\n" | 69 "Usage: %s [options]\n" |
| 70 "\n" | 70 "\n" |
| 71 "Options:\n" | 71 "Options:\n" |
| 72 " --audio-pipe-name=<pipe> - Sets the pipe name to capture audio on Linux.\n" | 72 " --audio-pipe-name=<pipe> - Sets the pipe name to capture audio on Linux.\n " |
| 73 " --console - Runs the daemon interactively.\n" | 73 " --console - Runs the daemon interactively.\n" |
| 74 " --daemon-pipe=<pipe> - Specifies the pipe to connect to the daemon.\n" | 74 " --daemon-pipe=<pipe> - Specifies the pipe to connect to the daemon.\n" |
| 75 " --elevate=<binary> - Runs <binary> elevated.\n" | 75 " --elevate=<binary> - Runs <binary> elevated.\n" |
| 76 " --host-config=<config> - Specifies the host configuration.\n" | 76 " --host-config=<config> - Specifies the host configuration.\n" |
| 77 " --help, -? - Print this message.\n" | 77 " --help, -? - Print this message.\n" |
| 78 " --type - Specifies process type.\n" | 78 " --type - Specifies process type.\n" |
| 79 " --version - Prints the host version and exits.\n"; | 79 " --version - Prints the host version and exits.\n" |
| 80 " --window-Id=<id> - Specifies that a window should be streamed.\n"; | |
|
Lambros
2014/07/30 00:14:48
Please use lower-case: window-id
Also, you don't n
ronakvora do not use
2014/07/30 20:55:35
Done.
ronakvora do not use
2014/07/30 20:56:40
Done.
| |
| 80 | 81 |
| 81 void Usage(const base::FilePath& program_name) { | 82 void Usage(const base::FilePath& program_name) { |
| 82 printf(kUsageMessage, program_name.MaybeAsASCII().c_str()); | 83 printf(kUsageMessage, program_name.MaybeAsASCII().c_str()); |
| 83 } | 84 } |
| 84 | 85 |
| 85 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
| 86 | 87 |
| 87 // Runs the binary specified by the command line, elevated. | 88 // Runs the binary specified by the command line, elevated. |
| 88 int RunElevated() { | 89 int RunElevated() { |
| 89 const base::CommandLine::SwitchMap& switches = | 90 const base::CommandLine::SwitchMap& switches = |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 if (exit_code == kUsageExitCode) { | 231 if (exit_code == kUsageExitCode) { |
| 231 Usage(command_line->GetProgram()); | 232 Usage(command_line->GetProgram()); |
| 232 } | 233 } |
| 233 | 234 |
| 234 remoting::UnloadResources(); | 235 remoting::UnloadResources(); |
| 235 | 236 |
| 236 return exit_code; | 237 return exit_code; |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace remoting | 240 } // namespace remoting |
| OLD | NEW |