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 #include "headless/lib/browser/headless_devtools_client_impl.h" | 5 #include "headless/lib/browser/headless_devtools_client_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // HeadlessDevToolsClient. | 28 // HeadlessDevToolsClient. |
29 return static_cast<HeadlessDevToolsClientImpl*>(client); | 29 return static_cast<HeadlessDevToolsClientImpl*>(client); |
30 } | 30 } |
31 | 31 |
32 HeadlessDevToolsClientImpl::HeadlessDevToolsClientImpl() | 32 HeadlessDevToolsClientImpl::HeadlessDevToolsClientImpl() |
33 : agent_host_(nullptr), | 33 : agent_host_(nullptr), |
34 next_message_id_(0), | 34 next_message_id_(0), |
35 accessibility_domain_(this), | 35 accessibility_domain_(this), |
36 animation_domain_(this), | 36 animation_domain_(this), |
37 application_cache_domain_(this), | 37 application_cache_domain_(this), |
38 browser_domain_(this), | |
39 cache_storage_domain_(this), | 38 cache_storage_domain_(this), |
40 console_domain_(this), | 39 console_domain_(this), |
41 css_domain_(this), | 40 css_domain_(this), |
42 database_domain_(this), | 41 database_domain_(this), |
43 debugger_domain_(this), | 42 debugger_domain_(this), |
44 device_orientation_domain_(this), | 43 device_orientation_domain_(this), |
45 dom_debugger_domain_(this), | 44 dom_debugger_domain_(this), |
46 dom_domain_(this), | 45 dom_domain_(this), |
47 dom_storage_domain_(this), | 46 dom_storage_domain_(this), |
48 emulation_domain_(this), | 47 emulation_domain_(this), |
49 heap_profiler_domain_(this), | 48 heap_profiler_domain_(this), |
50 indexeddb_domain_(this), | 49 indexeddb_domain_(this), |
51 input_domain_(this), | 50 input_domain_(this), |
52 inspector_domain_(this), | 51 inspector_domain_(this), |
53 io_domain_(this), | 52 io_domain_(this), |
54 layer_tree_domain_(this), | 53 layer_tree_domain_(this), |
55 log_domain_(this), | 54 log_domain_(this), |
56 memory_domain_(this), | 55 memory_domain_(this), |
57 network_domain_(this), | 56 network_domain_(this), |
58 page_domain_(this), | 57 page_domain_(this), |
59 profiler_domain_(this), | 58 profiler_domain_(this), |
60 rendering_domain_(this), | 59 rendering_domain_(this), |
61 runtime_domain_(this), | 60 runtime_domain_(this), |
62 security_domain_(this), | 61 security_domain_(this), |
63 service_worker_domain_(this), | 62 service_worker_domain_(this), |
| 63 target_domain_(this), |
64 tracing_domain_(this), | 64 tracing_domain_(this), |
65 worker_domain_(this), | 65 worker_domain_(this), |
66 browser_main_thread_(content::BrowserThread::GetTaskRunnerForThread( | 66 browser_main_thread_(content::BrowserThread::GetTaskRunnerForThread( |
67 content::BrowserThread::UI)), | 67 content::BrowserThread::UI)), |
68 weak_ptr_factory_(this) {} | 68 weak_ptr_factory_(this) {} |
69 | 69 |
70 HeadlessDevToolsClientImpl::~HeadlessDevToolsClientImpl() {} | 70 HeadlessDevToolsClientImpl::~HeadlessDevToolsClientImpl() {} |
71 | 71 |
72 void HeadlessDevToolsClientImpl::AttachToHost( | 72 void HeadlessDevToolsClientImpl::AttachToHost( |
73 content::DevToolsAgentHost* agent_host) { | 73 content::DevToolsAgentHost* agent_host) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 animation::Domain* HeadlessDevToolsClientImpl::GetAnimation() { | 176 animation::Domain* HeadlessDevToolsClientImpl::GetAnimation() { |
177 return &animation_domain_; | 177 return &animation_domain_; |
178 } | 178 } |
179 | 179 |
180 application_cache::Domain* HeadlessDevToolsClientImpl::GetApplicationCache() { | 180 application_cache::Domain* HeadlessDevToolsClientImpl::GetApplicationCache() { |
181 return &application_cache_domain_; | 181 return &application_cache_domain_; |
182 } | 182 } |
183 | 183 |
184 browser::Domain* HeadlessDevToolsClientImpl::GetBrowser() { | |
185 return &browser_domain_; | |
186 } | |
187 | |
188 cache_storage::Domain* HeadlessDevToolsClientImpl::GetCacheStorage() { | 184 cache_storage::Domain* HeadlessDevToolsClientImpl::GetCacheStorage() { |
189 return &cache_storage_domain_; | 185 return &cache_storage_domain_; |
190 } | 186 } |
191 | 187 |
192 console::Domain* HeadlessDevToolsClientImpl::GetConsole() { | 188 console::Domain* HeadlessDevToolsClientImpl::GetConsole() { |
193 return &console_domain_; | 189 return &console_domain_; |
194 } | 190 } |
195 | 191 |
196 css::Domain* HeadlessDevToolsClientImpl::GetCSS() { | 192 css::Domain* HeadlessDevToolsClientImpl::GetCSS() { |
197 return &css_domain_; | 193 return &css_domain_; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 274 } |
279 | 275 |
280 security::Domain* HeadlessDevToolsClientImpl::GetSecurity() { | 276 security::Domain* HeadlessDevToolsClientImpl::GetSecurity() { |
281 return &security_domain_; | 277 return &security_domain_; |
282 } | 278 } |
283 | 279 |
284 service_worker::Domain* HeadlessDevToolsClientImpl::GetServiceWorker() { | 280 service_worker::Domain* HeadlessDevToolsClientImpl::GetServiceWorker() { |
285 return &service_worker_domain_; | 281 return &service_worker_domain_; |
286 } | 282 } |
287 | 283 |
| 284 target::Domain* HeadlessDevToolsClientImpl::GetTarget() { |
| 285 return &target_domain_; |
| 286 } |
| 287 |
288 tracing::Domain* HeadlessDevToolsClientImpl::GetTracing() { | 288 tracing::Domain* HeadlessDevToolsClientImpl::GetTracing() { |
289 return &tracing_domain_; | 289 return &tracing_domain_; |
290 } | 290 } |
291 | 291 |
292 worker::Domain* HeadlessDevToolsClientImpl::GetWorker() { | 292 worker::Domain* HeadlessDevToolsClientImpl::GetWorker() { |
293 return &worker_domain_; | 293 return &worker_domain_; |
294 } | 294 } |
295 | 295 |
296 template <typename CallbackType> | 296 template <typename CallbackType> |
297 void HeadlessDevToolsClientImpl::FinalizeAndSendMessage( | 297 void HeadlessDevToolsClientImpl::FinalizeAndSendMessage( |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 HeadlessDevToolsClientImpl::Callback::Callback( | 368 HeadlessDevToolsClientImpl::Callback::Callback( |
369 base::Callback<void(const base::Value&)> callback) | 369 base::Callback<void(const base::Value&)> callback) |
370 : callback_with_result(callback) {} | 370 : callback_with_result(callback) {} |
371 | 371 |
372 HeadlessDevToolsClientImpl::Callback::~Callback() {} | 372 HeadlessDevToolsClientImpl::Callback::~Callback() {} |
373 | 373 |
374 HeadlessDevToolsClientImpl::Callback& HeadlessDevToolsClientImpl::Callback:: | 374 HeadlessDevToolsClientImpl::Callback& HeadlessDevToolsClientImpl::Callback:: |
375 operator=(Callback&& other) = default; | 375 operator=(Callback&& other) = default; |
376 | 376 |
377 } // namespace headless | 377 } // namespace headless |
OLD | NEW |