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_manager_delegate.h" | 5 #include "headless/lib/browser/headless_devtools_manager_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "content/public/browser/devtools_agent_host.h" | 11 #include "content/public/browser/devtools_agent_host.h" |
12 #include "content/public/browser/devtools_frontend_host.h" | 12 #include "content/public/browser/devtools_frontend_host.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "headless/grit/headless_lib_resources.h" | 14 #include "headless/grit/headless_lib_resources.h" |
15 #include "headless/lib/browser/headless_browser_context_impl.h" | 15 #include "headless/lib/browser/headless_browser_context_impl.h" |
16 #include "headless/lib/browser/headless_browser_impl.h" | 16 #include "headless/lib/browser/headless_browser_impl.h" |
17 #include "headless/lib/browser/headless_web_contents_impl.h" | 17 #include "headless/lib/browser/headless_web_contents_impl.h" |
18 #include "headless/public/domains/target.h" | 18 #include "headless/public/devtools/domains/target.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
21 namespace headless { | 21 namespace headless { |
22 | 22 |
23 HeadlessDevToolsManagerDelegate::HeadlessDevToolsManagerDelegate( | 23 HeadlessDevToolsManagerDelegate::HeadlessDevToolsManagerDelegate( |
24 base::WeakPtr<HeadlessBrowserImpl> browser) | 24 base::WeakPtr<HeadlessBrowserImpl> browser) |
25 : browser_(std::move(browser)), default_browser_context_(nullptr) { | 25 : browser_(std::move(browser)), default_browser_context_(nullptr) { |
26 command_map_["Target.createTarget"] = | 26 command_map_["Target.createTarget"] = |
27 &HeadlessDevToolsManagerDelegate::CreateTarget; | 27 &HeadlessDevToolsManagerDelegate::CreateTarget; |
28 command_map_["Target.closeTarget"] = | 28 command_map_["Target.closeTarget"] = |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 context->Close(); | 158 context->Close(); |
159 } | 159 } |
160 | 160 |
161 return target::DisposeBrowserContextResult::Builder() | 161 return target::DisposeBrowserContextResult::Builder() |
162 .SetSuccess(success) | 162 .SetSuccess(success) |
163 .Build() | 163 .Build() |
164 ->Serialize(); | 164 ->Serialize(); |
165 } | 165 } |
166 | 166 |
167 } // namespace headless | 167 } // namespace headless |
OLD | NEW |