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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 typedef AndroidDeviceManager::SocketCallback SocketCallback; | 58 typedef AndroidDeviceManager::SocketCallback SocketCallback; |
59 typedef AndroidDeviceManager::DeviceInfoCallback DeviceInfoCallback; | 59 typedef AndroidDeviceManager::DeviceInfoCallback DeviceInfoCallback; |
60 | 60 |
61 Device(const std::string& serial, bool is_connected); | 61 Device(const std::string& serial, bool is_connected); |
62 | 62 |
63 virtual void QueryDeviceInfo(const DeviceInfoCallback& callback) = 0; | 63 virtual void QueryDeviceInfo(const DeviceInfoCallback& callback) = 0; |
64 | 64 |
65 virtual void OpenSocket(const std::string& socket_name, | 65 virtual void OpenSocket(const std::string& socket_name, |
66 const SocketCallback& callback) = 0; | 66 const SocketCallback& callback) = 0; |
67 | 67 |
| 68 virtual void HttpQuery(const std::string& socket_name, |
| 69 const std::string& request, |
| 70 const CommandCallback& callback); |
| 71 |
68 std::string serial() { return serial_; } | 72 std::string serial() { return serial_; } |
69 bool is_connected() { return is_connected_; } | 73 bool is_connected() { return is_connected_; } |
70 | 74 |
71 friend class base::RefCounted<Device>; | 75 friend class base::RefCounted<Device>; |
72 virtual ~Device(); | 76 virtual ~Device(); |
73 | 77 |
74 private: | 78 private: |
75 const std::string serial_; | 79 const std::string serial_; |
76 const bool is_connected_; | 80 const bool is_connected_; |
77 | 81 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 150 |
147 Device* FindDevice(const std::string& serial); | 151 Device* FindDevice(const std::string& serial); |
148 | 152 |
149 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; | 153 typedef std::map<std::string, scoped_refptr<Device> > DeviceMap; |
150 DeviceMap devices_; | 154 DeviceMap devices_; |
151 | 155 |
152 bool stopped_; | 156 bool stopped_; |
153 }; | 157 }; |
154 | 158 |
155 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ | 159 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ANDROID_DEVICE_MANAGER_H_ |
OLD | NEW |