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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // DevToolsAndroidBridge::Listener implementation. | 70 // DevToolsAndroidBridge::Listener implementation. |
71 virtual void DeviceListChanged( | 71 virtual void DeviceListChanged( |
72 const DevToolsAndroidBridge::RemoteDevices& devices) OVERRIDE; | 72 const DevToolsAndroidBridge::RemoteDevices& devices) OVERRIDE; |
73 | 73 |
74 void OnPrefsChange(); | 74 void OnPrefsChange(); |
75 | 75 |
76 void StartListening(); | 76 void StartListening(); |
77 void StopListening(); | 77 void StopListening(); |
78 | 78 |
79 void UpdateConnections(); | 79 void UpdateConnections(); |
| 80 void ShutdownConnections(); |
80 | 81 |
81 void NotifyListeners(const DevicesStatus& status) const; | 82 void NotifyListeners(const DevicesStatus& status) const; |
82 | 83 |
83 Profile* profile_; | 84 Profile* profile_; |
84 PrefService* pref_service_; | 85 PrefService* pref_service_; |
85 PrefChangeRegistrar pref_change_registrar_; | 86 PrefChangeRegistrar pref_change_registrar_; |
86 Registry registry_; | 87 Registry registry_; |
87 | 88 |
88 typedef std::vector<Listener*> Listeners; | 89 typedef std::vector<Listener*> Listeners; |
89 Listeners listeners_; | 90 Listeners listeners_; |
90 bool listening_; | 91 bool listening_; |
91 | 92 |
92 typedef std::map<int, std::string> ForwardingMap; | 93 typedef std::map<int, std::string> ForwardingMap; |
93 ForwardingMap forwarding_map_; | 94 ForwardingMap forwarding_map_; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(PortForwardingController); | 96 DISALLOW_COPY_AND_ASSIGN(PortForwardingController); |
96 }; | 97 }; |
97 | 98 |
98 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ | 99 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ |
OLD | NEW |