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 "remoting/host/host_user_interface.h" | 5 #include "remoting/host/host_user_interface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/host/chromoting_host.h" | 8 #include "remoting/host/chromoting_host.h" |
9 #include "remoting/host/disconnect_window.h" | 9 #include "remoting/host/disconnect_window.h" |
10 #include "remoting/host/local_input_monitor.h" | 10 #include "remoting/host/local_input_monitor.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void HostUserInterface::OnDisconnectCallback() { | 83 void HostUserInterface::OnDisconnectCallback() { |
84 DCHECK(ui_task_runner_->BelongsToCurrentThread()); | 84 DCHECK(ui_task_runner_->BelongsToCurrentThread()); |
85 | 85 |
86 MonitorLocalInputs(false); | 86 MonitorLocalInputs(false); |
87 ShowDisconnectWindow(false, std::string()); | 87 ShowDisconnectWindow(false, std::string()); |
88 DisconnectSession(); | 88 DisconnectSession(); |
89 } | 89 } |
90 | 90 |
91 base::SingleThreadTaskRunner* HostUserInterface::network_task_runner() const { | 91 base::SingleThreadTaskRunner* HostUserInterface::network_task_runner() const { |
92 return network_task_runner_; | 92 return network_task_runner_.get(); |
93 } | 93 } |
94 | 94 |
95 base::SingleThreadTaskRunner* HostUserInterface::ui_task_runner() const { | 95 base::SingleThreadTaskRunner* HostUserInterface::ui_task_runner() const { |
96 return ui_task_runner_; | 96 return ui_task_runner_.get(); |
97 } | 97 } |
98 | 98 |
99 void HostUserInterface::DisconnectSession() const { | 99 void HostUserInterface::DisconnectSession() const { |
100 DCHECK(ui_task_runner_->BelongsToCurrentThread()); | 100 DCHECK(ui_task_runner_->BelongsToCurrentThread()); |
101 | 101 |
102 disconnect_callback_.Run(); | 102 disconnect_callback_.Run(); |
103 } | 103 } |
104 | 104 |
105 void HostUserInterface::ProcessOnClientAuthenticated( | 105 void HostUserInterface::ProcessOnClientAuthenticated( |
106 const std::string& username) { | 106 const std::string& username) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 disconnect_window_->Show( | 138 disconnect_window_->Show( |
139 host_, | 139 host_, |
140 base::Bind(&HostUserInterface::OnDisconnectCallback, weak_ptr_), | 140 base::Bind(&HostUserInterface::OnDisconnectCallback, weak_ptr_), |
141 username); | 141 username); |
142 } else { | 142 } else { |
143 disconnect_window_->Hide(); | 143 disconnect_window_->Hide(); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 } // namespace remoting | 147 } // namespace remoting |
OLD | NEW |