Chromium Code Reviews| 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" | |
| 13 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 14 #include "headless/grit/headless_lib_resources.h" | 13 #include "headless/grit/headless_lib_resources.h" |
| 15 #include "headless/lib/browser/headless_browser_context_impl.h" | 14 #include "headless/lib/browser/headless_browser_context_impl.h" |
| 16 #include "headless/lib/browser/headless_browser_impl.h" | 15 #include "headless/lib/browser/headless_browser_impl.h" |
| 17 #include "headless/lib/browser/headless_web_contents_impl.h" | 16 #include "headless/lib/browser/headless_web_contents_impl.h" |
| 18 #include "headless/public/devtools/domains/target.h" | 17 #include "headless/public/devtools/domains/target.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 20 | 19 |
| 20 #if !defined(OS_ANDROID) | |
|
chenwilliam
2017/03/20 23:59:40
@altimin Is headless only for desktop? If so, I'll
altimin
2017/03/21 00:12:10
Yes, headless is desktop-only.
| |
| 21 #include "content/public/browser/devtools_frontend_host.h" | |
| 22 #endif | |
| 23 | |
| 21 namespace headless { | 24 namespace headless { |
| 22 | 25 |
| 23 namespace { | 26 namespace { |
| 24 const char kIdParam[] = "id"; | 27 const char kIdParam[] = "id"; |
| 25 const char kResultParam[] = "result"; | 28 const char kResultParam[] = "result"; |
| 26 const char kErrorParam[] = "error"; | 29 const char kErrorParam[] = "error"; |
| 27 const char kErrorCodeParam[] = "code"; | 30 const char kErrorCodeParam[] = "code"; |
| 28 const char kErrorMessageParam[] = "message"; | 31 const char kErrorMessageParam[] = "message"; |
| 29 | 32 |
| 30 // JSON RPC 2.0 spec: http://www.jsonrpc.org/specification#error_object | 33 // JSON RPC 2.0 spec: http://www.jsonrpc.org/specification#error_object |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 | 233 |
| 231 std::unique_ptr<base::Value> result( | 234 std::unique_ptr<base::Value> result( |
| 232 target::DisposeBrowserContextResult::Builder() | 235 target::DisposeBrowserContextResult::Builder() |
| 233 .SetSuccess(success) | 236 .SetSuccess(success) |
| 234 .Build() | 237 .Build() |
| 235 ->Serialize()); | 238 ->Serialize()); |
| 236 return CreateSuccessResponse(command_id, std::move(result)); | 239 return CreateSuccessResponse(command_id, std::move(result)); |
| 237 } | 240 } |
| 238 | 241 |
| 239 } // namespace headless | 242 } // namespace headless |
| OLD | NEW |