-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
nw_screen_api.h
93 lines (72 loc) · 2.87 KB
/
nw_screen_api.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef NW_SRC_API_NW_SCREEN_API_H_
#define NW_SRC_API_NW_SCREEN_API_H_
#include "extensions/browser/extension_function.h"
namespace extensions {
// implement nw.Screen.getScreens()
class NwScreenGetScreensFunction: public NWSyncExtensionFunction {
public:
NwScreenGetScreensFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenGetScreensFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.getScreens", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenGetScreensFunction);
};
// implement nw.Screen.initEventListeners()
class NwScreenInitEventListenersFunction: public NWSyncExtensionFunction {
public:
NwScreenInitEventListenersFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenInitEventListenersFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.initEventListeners", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenInitEventListenersFunction);
};
// implement nw.Screen.startMonitor()
class NwScreenStartMonitorFunction : public NWSyncExtensionFunction {
public:
NwScreenStartMonitorFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenStartMonitorFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.startMonitor", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenStartMonitorFunction);
};
// implement nw.Screen.stopMonitor()
class NwScreenStopMonitorFunction : public NWSyncExtensionFunction {
public:
NwScreenStopMonitorFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenStopMonitorFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.stopMonitor", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenStopMonitorFunction);
};
// implement nw.Screen.isMonitorStarted()
class NwScreenIsMonitorStartedFunction : public NWSyncExtensionFunction {
public:
NwScreenIsMonitorStartedFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenIsMonitorStartedFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.isMonitorStarted", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenIsMonitorStartedFunction);
};
// implement nw.Screen.registerStream()
class NwScreenRegisterStreamFunction : public NWSyncExtensionFunction {
public:
NwScreenRegisterStreamFunction();
bool RunNWSync(base::ListValue* response, std::string* error) override;
protected:
~NwScreenRegisterStreamFunction() override {}
DECLARE_EXTENSION_FUNCTION("nw.Screen.registerStream", UNKNOWN)
private:
DISALLOW_COPY_AND_ASSIGN(NwScreenRegisterStreamFunction);
};
} // extensions
#endif //NW_SRC_API_NW_SCREEN_API_H_