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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_ADB_IMPL_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_ADB_IMPL_H_
11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h"
13 #include "chrome/test/chromedriver/chrome/adb.h"
16 class SingleThreadTaskRunner;
21 class AdbImpl : public Adb {
24 const scoped_refptr<base::SingleThreadTaskRunner>& io_message_loop_proxy,
28 // Overridden from Adb:
29 Status GetDevices(std::vector<std::string>* devices) override;
30 Status ForwardPort(const std::string& device_serial,
32 const std::string& remote_abstract) override;
33 Status SetCommandLineFile(const std::string& device_serial,
34 const std::string& command_line_file,
35 const std::string& exec_name,
36 const std::string& args) override;
37 Status CheckAppInstalled(const std::string& device_serial,
38 const std::string& package) override;
39 Status ClearAppData(const std::string& device_serial,
40 const std::string& package) override;
41 Status SetDebugApp(const std::string& device_serial,
42 const std::string& package) override;
43 Status Launch(const std::string& device_serial,
44 const std::string& package,
45 const std::string& activity) override;
46 Status ForceStop(const std::string& device_serial,
47 const std::string& package) override;
48 Status GetPidByName(const std::string& device_serial,
49 const std::string& process_name,
53 Status ExecuteCommand(const std::string& command,
54 std::string* response);
55 Status ExecuteHostCommand(const std::string& device_serial,
56 const std::string& host_command,
57 std::string* response);
58 Status ExecuteHostShellCommand(const std::string& device_serial,
59 const std::string& shell_command,
60 std::string* response);
62 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
67 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_ADB_IMPL_H_