Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: headless/lib/browser/headless_devtools_manager_delegate.cc

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for review Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 std::string HeadlessDevToolsManagerDelegate::GetTargetTitle( 70 std::string HeadlessDevToolsManagerDelegate::GetTargetTitle(
71 content::RenderFrameHost* host) { 71 content::RenderFrameHost* host) {
72 return ""; 72 return "";
73 } 73 }
74 74
75 scoped_refptr<content::DevToolsAgentHost> 75 scoped_refptr<content::DevToolsAgentHost>
76 HeadlessDevToolsManagerDelegate::CreateNewTarget(const GURL& url) { 76 HeadlessDevToolsManagerDelegate::CreateNewTarget(const GURL& url) {
77 return nullptr; 77 return nullptr;
78 } 78 }
79 79
80 std::string HeadlessDevToolsManagerDelegate::GetDiscoveryPageHTML() {
81 return ResourceBundle::GetSharedInstance().GetRawDataResource(
82 IDR_HEADLESS_LIB_DEVTOOLS_DISCOVERY_PAGE).as_string();
83 }
84
85 std::string HeadlessDevToolsManagerDelegate::GetFrontendResource(
86 const std::string& path) {
87 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
88 }
89
80 std::unique_ptr<base::Value> HeadlessDevToolsManagerDelegate::CreateTarget( 90 std::unique_ptr<base::Value> HeadlessDevToolsManagerDelegate::CreateTarget(
81 const base::DictionaryValue* params) { 91 const base::DictionaryValue* params) {
82 std::string url; 92 std::string url;
83 std::string browser_context_id; 93 std::string browser_context_id;
84 int width = browser_->options()->window_size.width(); 94 int width = browser_->options()->window_size.width();
85 int height = browser_->options()->window_size.height(); 95 int height = browser_->options()->window_size.height();
86 params->GetString("url", &url); 96 params->GetString("url", &url);
87 params->GetString("browserContextId", &browser_context_id); 97 params->GetString("browserContextId", &browser_context_id);
88 params->GetInteger("width", &width); 98 params->GetInteger("width", &width);
89 params->GetInteger("height", &height); 99 params->GetInteger("height", &height);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 context->Close(); 170 context->Close();
161 } 171 }
162 172
163 return browser::DisposeBrowserContextResult::Builder() 173 return browser::DisposeBrowserContextResult::Builder()
164 .SetSuccess(success) 174 .SetSuccess(success)
165 .Build() 175 .Build()
166 ->Serialize(); 176 ->Serialize();
167 } 177 }
168 178
169 } // namespace headless 179 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698