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

Side by Side Diff: content/shell/browser/shell_devtools_manager_delegate.cc

Issue 2273063002: DevTools: remove DevToolsTargetDescriptor and its implementations, we are now based on devtools age… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_devtools_manager_delegate.h" 5 #include "content/shell/browser/shell_devtools_manager_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "components/devtools_discovery/basic_target_descriptor.h"
21 #include "components/devtools_discovery/devtools_discovery_manager.h" 20 #include "components/devtools_discovery/devtools_discovery_manager.h"
22 #include "components/devtools_http_handler/devtools_http_handler.h" 21 #include "components/devtools_http_handler/devtools_http_handler.h"
23 #include "content/public/browser/browser_context.h" 22 #include "content/public/browser/browser_context.h"
24 #include "content/public/browser/devtools_agent_host.h" 23 #include "content/public/browser/devtools_agent_host.h"
25 #include "content/public/browser/devtools_frontend_host.h" 24 #include "content/public/browser/devtools_frontend_host.h"
26 #include "content/public/browser/favicon_status.h" 25 #include "content/public/browser/favicon_status.h"
27 #include "content/public/browser/navigation_entry.h" 26 #include "content/public/browser/navigation_entry.h"
28 #include "content/public/browser/render_view_host.h" 27 #include "content/public/browser/render_view_host.h"
29 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
30 #include "content/public/common/content_switches.h" 29 #include "content/public/common/content_switches.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 port = static_cast<uint16_t>(temp_port); 127 port = static_cast<uint16_t>(temp_port);
129 } else { 128 } else {
130 DLOG(WARNING) << "Invalid http debugger port number " << temp_port; 129 DLOG(WARNING) << "Invalid http debugger port number " << temp_port;
131 } 130 }
132 } 131 }
133 return std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory>( 132 return std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory>(
134 new TCPServerSocketFactory("127.0.0.1", port)); 133 new TCPServerSocketFactory("127.0.0.1", port));
135 #endif 134 #endif
136 } 135 }
137 136
138 std::unique_ptr<devtools_discovery::DevToolsTargetDescriptor> 137 scoped_refptr<content::DevToolsAgentHost>
139 CreateNewShellTarget(BrowserContext* browser_context, const GURL& url) { 138 CreateNewShellTarget(BrowserContext* browser_context, const GURL& url) {
140 Shell* shell = Shell::CreateNewWindow(browser_context, 139 Shell* shell = Shell::CreateNewWindow(browser_context,
141 url, 140 url,
142 nullptr, 141 nullptr,
143 gfx::Size()); 142 gfx::Size());
144 return base::WrapUnique(new devtools_discovery::BasicTargetDescriptor( 143 return DevToolsAgentHost::GetOrCreateFor(shell->web_contents());
145 DevToolsAgentHost::GetOrCreateFor(shell->web_contents())));
146 } 144 }
147 145
148 // ShellDevToolsDelegate ---------------------------------------------------- 146 // ShellDevToolsDelegate ----------------------------------------------------
149 147
150 class ShellDevToolsDelegate : 148 class ShellDevToolsDelegate :
151 public devtools_http_handler::DevToolsHttpHandlerDelegate { 149 public devtools_http_handler::DevToolsHttpHandlerDelegate {
152 public: 150 public:
153 explicit ShellDevToolsDelegate(BrowserContext* browser_context); 151 explicit ShellDevToolsDelegate(BrowserContext* browser_context);
154 ~ShellDevToolsDelegate() override; 152 ~ShellDevToolsDelegate() override;
155 153
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 std::string ShellDevToolsManagerDelegate::GetTargetType(RenderFrameHost* host) { 237 std::string ShellDevToolsManagerDelegate::GetTargetType(RenderFrameHost* host) {
240 return DevToolsAgentHost::kTypePage; 238 return DevToolsAgentHost::kTypePage;
241 } 239 }
242 240
243 std::string ShellDevToolsManagerDelegate::GetTargetTitle( 241 std::string ShellDevToolsManagerDelegate::GetTargetTitle(
244 RenderFrameHost* host) { 242 RenderFrameHost* host) {
245 return ""; 243 return "";
246 } 244 }
247 245
248 } // namespace content 246 } // namespace content
OLDNEW
« content/public/browser/devtools_agent_host.h ('K') | « content/public/browser/devtools_agent_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698