| 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
| 6 | 6 |
| 7 #include <utility> // For std::pair. | 7 #include <utility> // For std::pair. |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 // it'll reap the process. However, if GetTerminationStatus didn't | 510 // it'll reap the process. However, if GetTerminationStatus didn't |
| 511 // reap the child (because it was still running), we'll need to | 511 // reap the child (because it was still running), we'll need to |
| 512 // Terminate via ProcessWatcher. So we can't close the handle here. | 512 // Terminate via ProcessWatcher. So we can't close the handle here. |
| 513 if (context_->termination_status_ != base::TERMINATION_STATUS_STILL_RUNNING) | 513 if (context_->termination_status_ != base::TERMINATION_STATUS_STILL_RUNNING) |
| 514 context_->process_.Close(); | 514 context_->process_.Close(); |
| 515 | 515 |
| 516 return context_->termination_status_; | 516 return context_->termination_status_; |
| 517 } | 517 } |
| 518 | 518 |
| 519 void ChildProcessLauncher::SetProcessBackgrounded(bool background) { | 519 void ChildProcessLauncher::SetProcessBackgrounded(bool background) { |
| 520 context_->process_.SetProcessBackgrounded(background); | 520 context_->SetProcessBackgrounded(background); |
| 521 } | 521 } |
| 522 | 522 |
| 523 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 523 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
| 524 bool terminate_on_shutdown) { | 524 bool terminate_on_shutdown) { |
| 525 if (context_.get()) | 525 if (context_.get()) |
| 526 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 526 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
| 527 } | 527 } |
| 528 | 528 |
| 529 } // namespace content | 529 } // namespace content |
| OLD | NEW |