OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/process_proxy/process_proxy_registry.h" | 5 #include "chrome/browser/chromeos/process_proxy/process_proxy_registry.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/public/browser/browser_thread.h" | |
9 | 8 |
10 namespace { | 9 namespace { |
11 | 10 |
12 const char kWatcherThreadName[] = "ProcessWatcherThread"; | 11 const char kWatcherThreadName[] = "ProcessWatcherThread"; |
13 | 12 |
14 const char kStdoutOutputType[] = "stdout"; | 13 const char kStdoutOutputType[] = "stdout"; |
15 const char kStderrOutputType[] = "stderr"; | 14 const char kStderrOutputType[] = "stderr"; |
16 const char kExitOutputType[] = "exit"; | 15 const char kExitOutputType[] = "exit"; |
17 | 16 |
18 const char* ProcessOutputTypeToString(ProcessOutputType type) { | 17 const char* ProcessOutputTypeToString(ProcessOutputType type) { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (it == proxy_map_.end()) | 131 if (it == proxy_map_.end()) |
133 return; | 132 return; |
134 it->second.callback.Run(pid, std::string(type_str), data); | 133 it->second.callback.Run(pid, std::string(type_str), data); |
135 | 134 |
136 // Contact with the slave end of the terminal has been lost. We have to close | 135 // Contact with the slave end of the terminal has been lost. We have to close |
137 // the process. | 136 // the process. |
138 if (type == PROCESS_OUTPUT_TYPE_EXIT) | 137 if (type == PROCESS_OUTPUT_TYPE_EXIT) |
139 CloseProcess(pid); | 138 CloseProcess(pid); |
140 } | 139 } |
141 | 140 |
OLD | NEW |