forked from mafredri/cdp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcdp_client.go
More file actions
152 lines (148 loc) · 5.96 KB
/
Copy pathcdp_client.go
File metadata and controls
152 lines (148 loc) · 5.96 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Code generated by cdpgen. DO NOT EDIT.
package cdp
import (
"github.com/mafredri/cdp/protocol/accessibility"
"github.com/mafredri/cdp/protocol/animation"
"github.com/mafredri/cdp/protocol/applicationcache"
"github.com/mafredri/cdp/protocol/audits"
"github.com/mafredri/cdp/protocol/backgroundservice"
"github.com/mafredri/cdp/protocol/browser"
"github.com/mafredri/cdp/protocol/cachestorage"
"github.com/mafredri/cdp/protocol/cast"
"github.com/mafredri/cdp/protocol/console"
"github.com/mafredri/cdp/protocol/css"
"github.com/mafredri/cdp/protocol/database"
"github.com/mafredri/cdp/protocol/debugger"
"github.com/mafredri/cdp/protocol/deviceorientation"
"github.com/mafredri/cdp/protocol/dom"
"github.com/mafredri/cdp/protocol/domdebugger"
"github.com/mafredri/cdp/protocol/domsnapshot"
"github.com/mafredri/cdp/protocol/domstorage"
"github.com/mafredri/cdp/protocol/emulation"
"github.com/mafredri/cdp/protocol/fetch"
"github.com/mafredri/cdp/protocol/headlessexperimental"
"github.com/mafredri/cdp/protocol/heapprofiler"
"github.com/mafredri/cdp/protocol/indexeddb"
"github.com/mafredri/cdp/protocol/input"
"github.com/mafredri/cdp/protocol/inspector"
"github.com/mafredri/cdp/protocol/io"
"github.com/mafredri/cdp/protocol/layertree"
"github.com/mafredri/cdp/protocol/log"
"github.com/mafredri/cdp/protocol/memory"
"github.com/mafredri/cdp/protocol/network"
"github.com/mafredri/cdp/protocol/overlay"
"github.com/mafredri/cdp/protocol/page"
"github.com/mafredri/cdp/protocol/performance"
"github.com/mafredri/cdp/protocol/profiler"
"github.com/mafredri/cdp/protocol/runtime"
"github.com/mafredri/cdp/protocol/schema"
"github.com/mafredri/cdp/protocol/security"
"github.com/mafredri/cdp/protocol/serviceworker"
"github.com/mafredri/cdp/protocol/storage"
"github.com/mafredri/cdp/protocol/systeminfo"
"github.com/mafredri/cdp/protocol/target"
"github.com/mafredri/cdp/protocol/tethering"
"github.com/mafredri/cdp/protocol/tracing"
"github.com/mafredri/cdp/protocol/webaudio"
"github.com/mafredri/cdp/protocol/webauthn"
"github.com/mafredri/cdp/rpcc"
)
// Client represents a Chrome DevTools Protocol client that can be used to
// invoke methods or listen to events in every CDP domain. The Client consumes
// a rpcc connection, used to invoke the methods.
type Client struct {
Accessibility Accessibility
Animation Animation
ApplicationCache ApplicationCache
Audits Audits
BackgroundService BackgroundService
Browser Browser
CSS CSS
CacheStorage CacheStorage
Cast Cast
Console Console
DOM DOM
DOMDebugger DOMDebugger
DOMSnapshot DOMSnapshot
DOMStorage DOMStorage
Database Database
Debugger Debugger
DeviceOrientation DeviceOrientation
Emulation Emulation
Fetch Fetch
HeadlessExperimental HeadlessExperimental
HeapProfiler HeapProfiler
IO IO
IndexedDB IndexedDB
Input Input
Inspector Inspector
LayerTree LayerTree
Log Log
Memory Memory
Network Network
Overlay Overlay
Page Page
Performance Performance
Profiler Profiler
Runtime Runtime
Schema Schema
Security Security
ServiceWorker ServiceWorker
Storage Storage
SystemInfo SystemInfo
Target Target
Tethering Tethering
Tracing Tracing
WebAudio WebAudio
WebAuthn WebAuthn
}
// NewClient returns a new Client that uses conn
// for communication with the debugging target.
func NewClient(conn *rpcc.Conn) *Client {
return &Client{
Accessibility: accessibility.NewClient(conn),
Animation: animation.NewClient(conn),
ApplicationCache: applicationcache.NewClient(conn),
Audits: audits.NewClient(conn),
BackgroundService: backgroundservice.NewClient(conn),
Browser: browser.NewClient(conn),
CSS: css.NewClient(conn),
CacheStorage: cachestorage.NewClient(conn),
Cast: cast.NewClient(conn),
Console: console.NewClient(conn),
DOM: dom.NewClient(conn),
DOMDebugger: domdebugger.NewClient(conn),
DOMSnapshot: domsnapshot.NewClient(conn),
DOMStorage: domstorage.NewClient(conn),
Database: database.NewClient(conn),
Debugger: debugger.NewClient(conn),
DeviceOrientation: deviceorientation.NewClient(conn),
Emulation: emulation.NewClient(conn),
Fetch: fetch.NewClient(conn),
HeadlessExperimental: headlessexperimental.NewClient(conn),
HeapProfiler: heapprofiler.NewClient(conn),
IO: io.NewClient(conn),
IndexedDB: indexeddb.NewClient(conn),
Input: input.NewClient(conn),
Inspector: inspector.NewClient(conn),
LayerTree: layertree.NewClient(conn),
Log: log.NewClient(conn),
Memory: memory.NewClient(conn),
Network: network.NewClient(conn),
Overlay: overlay.NewClient(conn),
Page: page.NewClient(conn),
Performance: performance.NewClient(conn),
Profiler: profiler.NewClient(conn),
Runtime: runtime.NewClient(conn),
Schema: schema.NewClient(conn),
Security: security.NewClient(conn),
ServiceWorker: serviceworker.NewClient(conn),
Storage: storage.NewClient(conn),
SystemInfo: systeminfo.NewClient(conn),
Target: target.NewClient(conn),
Tethering: tethering.NewClient(conn),
Tracing: tracing.NewClient(conn),
WebAudio: webaudio.NewClient(conn),
WebAuthn: webauthn.NewClient(conn),
}
}