OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ | 5 #ifndef HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ |
6 #define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ | 6 #define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "headless/public/headless_export.h" | 11 #include "headless/public/headless_export.h" |
12 | 12 |
13 namespace headless { | 13 namespace headless { |
14 | 14 |
15 namespace accessibility { | 15 namespace accessibility { |
16 class Domain; | 16 class Domain; |
17 } | 17 } |
18 namespace animation { | 18 namespace animation { |
19 class Domain; | 19 class Domain; |
20 } | 20 } |
21 namespace application_cache { | 21 namespace application_cache { |
22 class Domain; | 22 class Domain; |
23 } | 23 } |
24 namespace browser { | |
25 class Domain; | |
26 } | |
27 namespace cache_storage { | 24 namespace cache_storage { |
28 class Domain; | 25 class Domain; |
29 } | 26 } |
30 namespace console { | 27 namespace console { |
31 class Domain; | 28 class Domain; |
32 } | 29 } |
33 namespace css { | 30 namespace css { |
34 class Domain; | 31 class Domain; |
35 } | 32 } |
36 namespace database { | 33 namespace database { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 89 } |
93 namespace runtime { | 90 namespace runtime { |
94 class Domain; | 91 class Domain; |
95 } | 92 } |
96 namespace security { | 93 namespace security { |
97 class Domain; | 94 class Domain; |
98 } | 95 } |
99 namespace service_worker { | 96 namespace service_worker { |
100 class Domain; | 97 class Domain; |
101 } | 98 } |
| 99 namespace target { |
| 100 class Domain; |
| 101 } |
102 namespace tracing { | 102 namespace tracing { |
103 class Domain; | 103 class Domain; |
104 } | 104 } |
105 namespace worker { | 105 namespace worker { |
106 class Domain; | 106 class Domain; |
107 } | 107 } |
108 | 108 |
109 // An interface for controlling and receiving events from a devtools target. | 109 // An interface for controlling and receiving events from a devtools target. |
110 class HEADLESS_EXPORT HeadlessDevToolsClient { | 110 class HEADLESS_EXPORT HeadlessDevToolsClient { |
111 public: | 111 public: |
112 virtual ~HeadlessDevToolsClient() {} | 112 virtual ~HeadlessDevToolsClient() {} |
113 | 113 |
114 static std::unique_ptr<HeadlessDevToolsClient> Create(); | 114 static std::unique_ptr<HeadlessDevToolsClient> Create(); |
115 | 115 |
116 // DevTools commands are split into domains which corresponds to the getters | 116 // DevTools commands are split into domains which corresponds to the getters |
117 // below. Each domain can be used to send commands and to subscribe to events. | 117 // below. Each domain can be used to send commands and to subscribe to events. |
118 // | 118 // |
119 // See http://chromedevtools.github.io/debugger-protocol-viewer/ for | 119 // See http://chromedevtools.github.io/debugger-protocol-viewer/ for |
120 // the capabilities of each domain. | 120 // the capabilities of each domain. |
121 virtual accessibility::Domain* GetAccessibility() = 0; | 121 virtual accessibility::Domain* GetAccessibility() = 0; |
122 virtual animation::Domain* GetAnimation() = 0; | 122 virtual animation::Domain* GetAnimation() = 0; |
123 virtual application_cache::Domain* GetApplicationCache() = 0; | 123 virtual application_cache::Domain* GetApplicationCache() = 0; |
124 virtual browser::Domain* GetBrowser() = 0; | |
125 virtual cache_storage::Domain* GetCacheStorage() = 0; | 124 virtual cache_storage::Domain* GetCacheStorage() = 0; |
126 virtual console::Domain* GetConsole() = 0; | 125 virtual console::Domain* GetConsole() = 0; |
127 virtual css::Domain* GetCSS() = 0; | 126 virtual css::Domain* GetCSS() = 0; |
128 virtual database::Domain* GetDatabase() = 0; | 127 virtual database::Domain* GetDatabase() = 0; |
129 virtual debugger::Domain* GetDebugger() = 0; | 128 virtual debugger::Domain* GetDebugger() = 0; |
130 virtual device_orientation::Domain* GetDeviceOrientation() = 0; | 129 virtual device_orientation::Domain* GetDeviceOrientation() = 0; |
131 virtual dom::Domain* GetDOM() = 0; | 130 virtual dom::Domain* GetDOM() = 0; |
132 virtual dom_debugger::Domain* GetDOMDebugger() = 0; | 131 virtual dom_debugger::Domain* GetDOMDebugger() = 0; |
133 virtual dom_storage::Domain* GetDOMStorage() = 0; | 132 virtual dom_storage::Domain* GetDOMStorage() = 0; |
134 virtual emulation::Domain* GetEmulation() = 0; | 133 virtual emulation::Domain* GetEmulation() = 0; |
135 virtual heap_profiler::Domain* GetHeapProfiler() = 0; | 134 virtual heap_profiler::Domain* GetHeapProfiler() = 0; |
136 virtual indexeddb::Domain* GetIndexedDB() = 0; | 135 virtual indexeddb::Domain* GetIndexedDB() = 0; |
137 virtual input::Domain* GetInput() = 0; | 136 virtual input::Domain* GetInput() = 0; |
138 virtual inspector::Domain* GetInspector() = 0; | 137 virtual inspector::Domain* GetInspector() = 0; |
139 virtual io::Domain* GetIO() = 0; | 138 virtual io::Domain* GetIO() = 0; |
140 virtual layer_tree::Domain* GetLayerTree() = 0; | 139 virtual layer_tree::Domain* GetLayerTree() = 0; |
141 virtual log::Domain* GetLog() = 0; | 140 virtual log::Domain* GetLog() = 0; |
142 virtual memory::Domain* GetMemory() = 0; | 141 virtual memory::Domain* GetMemory() = 0; |
143 virtual network::Domain* GetNetwork() = 0; | 142 virtual network::Domain* GetNetwork() = 0; |
144 virtual page::Domain* GetPage() = 0; | 143 virtual page::Domain* GetPage() = 0; |
145 virtual profiler::Domain* GetProfiler() = 0; | 144 virtual profiler::Domain* GetProfiler() = 0; |
146 virtual rendering::Domain* GetRendering() = 0; | 145 virtual rendering::Domain* GetRendering() = 0; |
147 virtual runtime::Domain* GetRuntime() = 0; | 146 virtual runtime::Domain* GetRuntime() = 0; |
148 virtual security::Domain* GetSecurity() = 0; | 147 virtual security::Domain* GetSecurity() = 0; |
149 virtual service_worker::Domain* GetServiceWorker() = 0; | 148 virtual service_worker::Domain* GetServiceWorker() = 0; |
| 149 virtual target::Domain* GetTarget() = 0; |
150 virtual tracing::Domain* GetTracing() = 0; | 150 virtual tracing::Domain* GetTracing() = 0; |
151 virtual worker::Domain* GetWorker() = 0; | 151 virtual worker::Domain* GetWorker() = 0; |
152 | 152 |
153 // TODO(skyostil): Add notification for disconnection. | 153 // TODO(skyostil): Add notification for disconnection. |
154 | 154 |
155 private: | 155 private: |
156 friend class HeadlessDevToolsClientImpl; | 156 friend class HeadlessDevToolsClientImpl; |
157 | 157 |
158 HeadlessDevToolsClient() {} | 158 HeadlessDevToolsClient() {} |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClient); | 160 DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClient); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace headless | 163 } // namespace headless |
164 | 164 |
165 #endif // HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ | 165 #endif // HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_ |
OLD | NEW |