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 "tools/android/forwarder2/device_controller.h" | 5 #include "tools/android/forwarder2/device_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/callback_helpers.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop/message_loop_proxy.h" | 13 #include "base/message_loop/message_loop_proxy.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "tools/android/forwarder2/command.h" | 15 #include "tools/android/forwarder2/command.h" |
16 #include "tools/android/forwarder2/device_listener.h" | 16 #include "tools/android/forwarder2/device_listener.h" |
17 #include "tools/android/forwarder2/socket.h" | 17 #include "tools/android/forwarder2/socket.h" |
18 | 18 |
19 namespace forwarder2 { | 19 namespace forwarder2 { |
20 | 20 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 listener_port); | 145 listener_port); |
146 if (listener_it == controller->listeners_.end()) | 146 if (listener_it == controller->listeners_.end()) |
147 return; | 147 return; |
148 const linked_ptr<DeviceListener> listener = listener_it->second; | 148 const linked_ptr<DeviceListener> listener = listener_it->second; |
149 // Note that the listener is removed from the map before it gets destroyed in | 149 // Note that the listener is removed from the map before it gets destroyed in |
150 // case its destructor would access the map. | 150 // case its destructor would access the map. |
151 controller->listeners_.erase(listener_it); | 151 controller->listeners_.erase(listener_it); |
152 } | 152 } |
153 | 153 |
154 } // namespace forwarder | 154 } // namespace forwarder |
OLD | NEW |