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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 public: | 76 public: |
77 static scoped_refptr<AndroidDeviceManager> Create(); | 77 static scoped_refptr<AndroidDeviceManager> Create(); |
78 | 78 |
79 typedef std::vector<scoped_refptr<DeviceProvider> > DeviceProviders; | 79 typedef std::vector<scoped_refptr<DeviceProvider> > DeviceProviders; |
80 typedef base::Callback<void (const std::vector<std::string>&)> | 80 typedef base::Callback<void (const std::vector<std::string>&)> |
81 QueryDevicesCallback; | 81 QueryDevicesCallback; |
82 | 82 |
83 void QueryDevices(const DeviceProviders& providers, | 83 void QueryDevices(const DeviceProviders& providers, |
84 const QueryDevicesCallback& callback); | 84 const QueryDevicesCallback& callback); |
85 | 85 |
86 void Stop(); | 86 void ReleaseDevice(const std::string& serial); |
87 | 87 |
88 bool IsConnected(const std::string& serial); | 88 bool IsConnected(const std::string& serial); |
89 | 89 |
90 void RunCommand(const std::string& serial, | 90 void RunCommand(const std::string& serial, |
91 const std::string& command, | 91 const std::string& command, |
92 const CommandCallback& callback); | 92 const CommandCallback& callback); |
93 | 93 |
94 void OpenSocket(const std::string& serial, | 94 void OpenSocket(const std::string& serial, |
95 const std::string& socket_name, | 95 const std::string& socket_name, |
96 const SocketCallback& callback); | 96 const SocketCallback& callback); |
(...skipping 18 matching lines...) Expand all Loading... |
115 void QueryNextProvider( | 115 void QueryNextProvider( |
116 const QueryDevicesCallback& callback, | 116 const QueryDevicesCallback& callback, |
117 const DeviceProviders& providers, | 117 const DeviceProviders& providers, |
118 const Devices& total_devices, | 118 const Devices& total_devices, |
119 const Devices& new_devices); | 119 const Devices& new_devices); |
120 | 120 |
121 Device* FindDevice(const std::string& serial); | 121 Device* FindDevice(const std::string& serial); |
122 | 122 |
123 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; | 123 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; |
124 DeviceMap devices_; | 124 DeviceMap devices_; |
125 | |
126 bool stopped_; | |
127 }; | 125 }; |
128 | 126 |
129 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ | 127 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ |
OLD | NEW |