forked from googlearchive/ADBPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ADBPluginAPI.h
44 lines (33 loc) · 1.1 KB
/
ADBPluginAPI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include <sstream>
#include <boost/weak_ptr.hpp>
#include "JSAPIAuto.h"
#include "BrowserHost.h"
#include "ADBPlugin.h"
#ifndef H_ADBPluginAPI
#define H_ADBPluginAPI
class ADBPluginAPI : public FB::JSAPIAuto
{
public:
ADBPluginAPI(const ADBPluginPtr& plugin, const FB::BrowserHostPtr& host) :
m_plugin(plugin), m_host(host)
{
registerMethod("startServer", make_method(this, &ADBPluginAPI::startServer));
registerMethod("killServer", make_method(this, &ADBPluginAPI::killServer));
registerMethod("devices", make_method(this, &ADBPluginAPI::devices));
}
virtual ~ADBPluginAPI() {};
ADBPluginPtr getPlugin();
FB::variant startServer();
FB::variant killServer();
FB::variant devices();
private:
std::string adb(const std::string& command);
ADBPluginWeakPtr m_plugin;
FB::BrowserHostPtr m_host;
std::string m_testString;
};
#endif // H_ADBPluginAPI