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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_
8 #include "chrome/browser/devtools/device/android_device_manager.h"
10 // Instantiate this class only in a test and/or when DEBUG_DEVTOOLS is defined.
11 class SelfAsDeviceProvider
: public AndroidDeviceManager::DeviceProvider
{
13 explicit SelfAsDeviceProvider(int port
);
15 void QueryDevices(const SerialsCallback
& callback
) override
;
17 void QueryDeviceInfo(const std::string
& serial
,
18 const DeviceInfoCallback
& callback
) override
;
20 void OpenSocket(const std::string
& serial
,
21 const std::string
& socket_name
,
22 const SocketCallback
& callback
) override
;
24 void ReleaseDevice(const std::string
& serial
) override
;
26 void set_release_callback_for_test(const base::Closure
& callback
);
29 ~SelfAsDeviceProvider() override
;
32 base::Closure release_callback_
;
35 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_