| 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/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // HeadlessDevToolsClient. | 26 // HeadlessDevToolsClient. |
| 27 return static_cast<HeadlessDevToolsClientImpl*>(client); | 27 return static_cast<HeadlessDevToolsClientImpl*>(client); |
| 28 } | 28 } |
| 29 | 29 |
| 30 HeadlessDevToolsClientImpl::HeadlessDevToolsClientImpl() | 30 HeadlessDevToolsClientImpl::HeadlessDevToolsClientImpl() |
| 31 : agent_host_(nullptr), | 31 : agent_host_(nullptr), |
| 32 next_message_id_(0), | 32 next_message_id_(0), |
| 33 accessibility_domain_(this), | 33 accessibility_domain_(this), |
| 34 animation_domain_(this), | 34 animation_domain_(this), |
| 35 application_cache_domain_(this), | 35 application_cache_domain_(this), |
| 36 browser_domain_(this), |
| 36 cache_storage_domain_(this), | 37 cache_storage_domain_(this), |
| 37 console_domain_(this), | 38 console_domain_(this), |
| 38 css_domain_(this), | 39 css_domain_(this), |
| 39 database_domain_(this), | 40 database_domain_(this), |
| 40 debugger_domain_(this), | 41 debugger_domain_(this), |
| 41 device_orientation_domain_(this), | 42 device_orientation_domain_(this), |
| 42 dom_debugger_domain_(this), | 43 dom_debugger_domain_(this), |
| 43 dom_domain_(this), | 44 dom_domain_(this), |
| 44 dom_storage_domain_(this), | 45 dom_storage_domain_(this), |
| 45 emulation_domain_(this), | 46 emulation_domain_(this), |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 152 } |
| 152 | 153 |
| 153 animation::Domain* HeadlessDevToolsClientImpl::GetAnimation() { | 154 animation::Domain* HeadlessDevToolsClientImpl::GetAnimation() { |
| 154 return &animation_domain_; | 155 return &animation_domain_; |
| 155 } | 156 } |
| 156 | 157 |
| 157 application_cache::Domain* HeadlessDevToolsClientImpl::GetApplicationCache() { | 158 application_cache::Domain* HeadlessDevToolsClientImpl::GetApplicationCache() { |
| 158 return &application_cache_domain_; | 159 return &application_cache_domain_; |
| 159 } | 160 } |
| 160 | 161 |
| 162 browser::Domain* HeadlessDevToolsClientImpl::GetBrowser() { |
| 163 return &browser_domain_; |
| 164 } |
| 165 |
| 161 cache_storage::Domain* HeadlessDevToolsClientImpl::GetCacheStorage() { | 166 cache_storage::Domain* HeadlessDevToolsClientImpl::GetCacheStorage() { |
| 162 return &cache_storage_domain_; | 167 return &cache_storage_domain_; |
| 163 } | 168 } |
| 164 | 169 |
| 165 console::Domain* HeadlessDevToolsClientImpl::GetConsole() { | 170 console::Domain* HeadlessDevToolsClientImpl::GetConsole() { |
| 166 return &console_domain_; | 171 return &console_domain_; |
| 167 } | 172 } |
| 168 | 173 |
| 169 css::Domain* HeadlessDevToolsClientImpl::GetCSS() { | 174 css::Domain* HeadlessDevToolsClientImpl::GetCSS() { |
| 170 return &css_domain_; | 175 return &css_domain_; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 HeadlessDevToolsClientImpl::Callback::Callback( | 342 HeadlessDevToolsClientImpl::Callback::Callback( |
| 338 base::Callback<void(const base::Value&)> callback) | 343 base::Callback<void(const base::Value&)> callback) |
| 339 : callback_with_result(callback) {} | 344 : callback_with_result(callback) {} |
| 340 | 345 |
| 341 HeadlessDevToolsClientImpl::Callback::~Callback() {} | 346 HeadlessDevToolsClientImpl::Callback::~Callback() {} |
| 342 | 347 |
| 343 HeadlessDevToolsClientImpl::Callback& HeadlessDevToolsClientImpl::Callback:: | 348 HeadlessDevToolsClientImpl::Callback& HeadlessDevToolsClientImpl::Callback:: |
| 344 operator=(Callback&& other) = default; | 349 operator=(Callback&& other) = default; |
| 345 | 350 |
| 346 } // namespace headless | 351 } // namespace headless |
| OLD | NEW |