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_ANDROID_DEVICE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 public: | 107 public: |
108 static scoped_refptr<AndroidDeviceManager> Create(); | 108 static scoped_refptr<AndroidDeviceManager> Create(); |
109 | 109 |
110 typedef std::vector<scoped_refptr<DeviceProvider> > DeviceProviders; | 110 typedef std::vector<scoped_refptr<DeviceProvider> > DeviceProviders; |
111 typedef base::Callback<void (const std::vector<std::string>&)> | 111 typedef base::Callback<void (const std::vector<std::string>&)> |
112 QueryDevicesCallback; | 112 QueryDevicesCallback; |
113 | 113 |
114 void QueryDevices(const DeviceProviders& providers, | 114 void QueryDevices(const DeviceProviders& providers, |
115 const QueryDevicesCallback& callback); | 115 const QueryDevicesCallback& callback); |
116 | 116 |
117 void Stop(); | 117 void ReleaseDevice(const std::string& serial); |
118 | 118 |
119 bool IsConnected(const std::string& serial); | 119 bool IsConnected(const std::string& serial); |
120 | 120 |
121 void QueryDeviceInfo(const std::string& serial, | 121 void QueryDeviceInfo(const std::string& serial, |
122 const DeviceInfoCallback& callback); | 122 const DeviceInfoCallback& callback); |
123 | 123 |
124 void OpenSocket(const std::string& serial, | 124 void OpenSocket(const std::string& serial, |
125 const std::string& socket_name, | 125 const std::string& socket_name, |
126 const SocketCallback& callback); | 126 const SocketCallback& callback); |
127 | 127 |
(...skipping 17 matching lines...) Expand all Loading... |
145 void QueryNextProvider( | 145 void QueryNextProvider( |
146 const QueryDevicesCallback& callback, | 146 const QueryDevicesCallback& callback, |
147 const DeviceProviders& providers, | 147 const DeviceProviders& providers, |
148 const Devices& total_devices, | 148 const Devices& total_devices, |
149 const Devices& new_devices); | 149 const Devices& new_devices); |
150 | 150 |
151 Device* FindDevice(const std::string& serial); | 151 Device* FindDevice(const std::string& serial); |
152 | 152 |
153 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; | 153 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; |
154 DeviceMap devices_; | 154 DeviceMap devices_; |
155 | |
156 bool stopped_; | |
157 }; | 155 }; |
158 | 156 |
159 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ | 157 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ |
OLD | NEW |