OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/service/remoting/chromoting_host_manager.h" | 5 #include "chrome/service/remoting/chromoting_host_manager.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/common/chrome_paths.h" | 8 #include "chrome/common/chrome_paths.h" |
9 #include "chrome/common/guid.h" | 9 #include "chrome/common/guid.h" |
10 #include "chrome/common/remoting/chromoting_host_info.h" | 10 #include "chrome/common/remoting/chromoting_host_info.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 main_message_loop_ = main_message_loop; | 35 main_message_loop_ = main_message_loop; |
36 chromoting_config_ = config; | 36 chromoting_config_ = config; |
37 | 37 |
38 if (!IsConfigInitialized()) { | 38 if (!IsConfigInitialized()) { |
39 InitializeConfig(); | 39 InitializeConfig(); |
40 } | 40 } |
41 | 41 |
42 if (IsEnabled()) { | 42 if (IsEnabled()) { |
| 43 // TODO(wez): Need to callback the Observer so that ServiceProcess |
| 44 // knows to stay alive to service Chromoting requests. |
| 45 // This will go away once we have a more consistent model for the |
| 46 // service process internals. |
| 47 observer_->OnChromotingHostEnabled(); |
43 Start(); | 48 Start(); |
44 } | 49 } |
45 } | 50 } |
46 | 51 |
47 void ChromotingHostManager::Teardown(Task* done_task) { | 52 void ChromotingHostManager::Teardown(Task* done_task) { |
48 Stop(done_task); | 53 Stop(done_task); |
49 } | 54 } |
50 | 55 |
51 ChromotingHostManager::~ChromotingHostManager() { | 56 ChromotingHostManager::~ChromotingHostManager() { |
52 DCHECK(!chromoting_host_); | 57 DCHECK(!chromoting_host_); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 chromoting_context_.reset(); | 194 chromoting_context_.reset(); |
190 chromoting_host_ = NULL; | 195 chromoting_host_ = NULL; |
191 | 196 |
192 if (shutdown_task_.get()) { | 197 if (shutdown_task_.get()) { |
193 shutdown_task_->Run(); | 198 shutdown_task_->Run(); |
194 shutdown_task_.reset(); | 199 shutdown_task_.reset(); |
195 } | 200 } |
196 } | 201 } |
197 | 202 |
198 } // namespace remoting | 203 } // namespace remoting |
OLD | NEW |