| 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 #include "mojo/shell/shell_test_helper.h" | 5 #include "mojo/shell/shell_test_helper.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "mojo/shell/context.h" | 10 #include "mojo/shell/context.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 base::Bind(&StartShellOnShellThread, state_), | 73 base::Bind(&StartShellOnShellThread, state_), |
| 74 base::Bind(&ShellTestHelper::OnShellStarted, base::Unretained(this))); | 74 base::Bind(&ShellTestHelper::OnShellStarted, base::Unretained(this))); |
| 75 run_loop_.reset(new base::RunLoop); | 75 run_loop_.reset(new base::RunLoop); |
| 76 run_loop_->Run(); | 76 run_loop_->Run(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ShellTestHelper::OnShellStarted() { | 79 void ShellTestHelper::OnShellStarted() { |
| 80 DCHECK(state_); | 80 DCHECK(state_); |
| 81 shell_client_.reset(new TestShellClient); | 81 shell_client_.reset(new TestShellClient); |
| 82 shell_.Bind(state_->shell_handle.Pass()); | 82 shell_.Bind(state_->shell_handle.Pass()); |
| 83 shell_->SetClient(shell_client_.get()); | 83 shell_.set_client(shell_client_.get()); |
| 84 run_loop_->Quit(); | 84 run_loop_->Quit(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace shell | 87 } // namespace shell |
| 88 } // namespace mojo | 88 } // namespace mojo |
| OLD | NEW |