OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ANDROID_DEVICE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_ANDROID_DEVICE_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_ANDROID_DEVICE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_ANDROID_DEVICE_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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 static void CountDevices(bool discover_usb_devices, | 74 static void CountDevices(bool discover_usb_devices, |
75 const base::Callback<void(int)>& callback); | 75 const base::Callback<void(int)>& callback); |
76 | 76 |
77 static scoped_refptr<AndroidDeviceProvider> GetAdbDeviceProvider(); | 77 static scoped_refptr<AndroidDeviceProvider> GetAdbDeviceProvider(); |
78 static scoped_refptr<AndroidDeviceProvider> | 78 static scoped_refptr<AndroidDeviceProvider> |
79 GetUsbDeviceProvider(Profile* profile); | 79 GetUsbDeviceProvider(Profile* profile); |
80 #if defined(DEBUG_DEVTOOLS) | 80 #if defined(DEBUG_DEVTOOLS) |
81 static scoped_refptr<AndroidDeviceProvider> GetSelfAsDeviceProvider(); | 81 static scoped_refptr<AndroidDeviceProvider> GetSelfAsDeviceProvider(); |
82 #endif | 82 #endif |
| 83 // Implemented in browser_tests. |
| 84 static scoped_refptr<AndroidDeviceProvider> GetMockDeviceProviderForTest(); |
83 | 85 |
84 protected: | 86 protected: |
85 friend struct | 87 friend struct |
86 content::BrowserThread::DeleteOnThread<content::BrowserThread::UI>; | 88 content::BrowserThread::DeleteOnThread<content::BrowserThread::UI>; |
87 friend class base::DeleteHelper<AndroidDeviceProvider>; | 89 friend class base::DeleteHelper<AndroidDeviceProvider>; |
88 | 90 |
89 AndroidDeviceProvider(); | 91 AndroidDeviceProvider(); |
90 virtual ~AndroidDeviceProvider(); | 92 virtual ~AndroidDeviceProvider(); |
91 static void RunCallbackOnUIThread(const QueryDevicesCallback& callback, | 93 static void RunCallbackOnUIThread(const QueryDevicesCallback& callback, |
92 const AndroidDevices& result); | 94 const AndroidDevices& result); |
93 | 95 |
94 scoped_refptr<RefCountedAdbThread> adb_thread_; | 96 scoped_refptr<RefCountedAdbThread> adb_thread_; |
95 }; | 97 }; |
96 | 98 |
97 #endif // CHROME_BROWSER_DEVTOOLS_ANDROID_DEVICE_H_ | 99 #endif // CHROME_BROWSER_DEVTOOLS_ANDROID_DEVICE_H_ |
OLD | NEW |