OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/arc/arc_bridge_service.h" | 5 #include "components/arc/arc_bridge_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 void ArcBridgeService::CloseInputChannel() { | 147 void ArcBridgeService::CloseInputChannel() { |
148 DCHECK(CalledOnValidThread()); | 148 DCHECK(CalledOnValidThread()); |
149 if (!input_ptr_) | 149 if (!input_ptr_) |
150 return; | 150 return; |
151 | 151 |
152 input_ptr_.reset(); | 152 input_ptr_.reset(); |
153 FOR_EACH_OBSERVER(Observer, observer_list(), OnInputInstanceClosed()); | 153 FOR_EACH_OBSERVER(Observer, observer_list(), OnInputInstanceClosed()); |
154 } | 154 } |
155 | 155 |
| 156 void ArcBridgeService::OnNetInstanceReady(NetInstancePtr net_ptr) { |
| 157 DCHECK(CalledOnValidThread()); |
| 158 net_ptr_ = std::move(net_ptr); |
| 159 FOR_EACH_OBSERVER(Observer, observer_list(), OnNetInstanceReady()); |
| 160 } |
| 161 |
156 void ArcBridgeService::OnNotificationsInstanceReady( | 162 void ArcBridgeService::OnNotificationsInstanceReady( |
157 NotificationsInstancePtr notifications_ptr) { | 163 NotificationsInstancePtr notifications_ptr) { |
158 DCHECK(CalledOnValidThread()); | 164 DCHECK(CalledOnValidThread()); |
159 temporary_notifications_ptr_ = std::move(notifications_ptr); | 165 temporary_notifications_ptr_ = std::move(notifications_ptr); |
160 temporary_notifications_ptr_.QueryVersion( | 166 temporary_notifications_ptr_.QueryVersion( |
161 base::Bind(&ArcBridgeService::OnNotificationsVersionReady, | 167 base::Bind(&ArcBridgeService::OnNotificationsVersionReady, |
162 weak_factory_.GetWeakPtr())); | 168 weak_factory_.GetWeakPtr())); |
163 } | 169 } |
164 | 170 |
165 void ArcBridgeService::OnNotificationsVersionReady(int32_t version) { | 171 void ArcBridgeService::OnNotificationsVersionReady(int32_t version) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 CloseAuthChannel(); | 284 CloseAuthChannel(); |
279 CloseClipboardChannel(); | 285 CloseClipboardChannel(); |
280 CloseInputChannel(); | 286 CloseInputChannel(); |
281 CloseNotificationsChannel(); | 287 CloseNotificationsChannel(); |
282 ClosePowerChannel(); | 288 ClosePowerChannel(); |
283 CloseProcessChannel(); | 289 CloseProcessChannel(); |
284 CloseSettingsChannel(); | 290 CloseSettingsChannel(); |
285 } | 291 } |
286 | 292 |
287 } // namespace arc | 293 } // namespace arc |
OLD | NEW |