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

Unified Diff: chrome/browser/devtools/remote_debugging_server.cc

Issue 2109243003: Introduce --remote-debugging-frontend switch for custom remote debugging front-end (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: support absolute path instead of HTTP endpoint Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/remote_debugging_server.cc
diff --git a/chrome/browser/devtools/remote_debugging_server.cc b/chrome/browser/devtools/remote_debugging_server.cc
index cf2750f276719814df20f9c2c79bcca07ccf5fa3..c0da8a673e96332d354dca4ab3a144e438073142 100644
--- a/chrome/browser/devtools/remote_debugging_server.cc
+++ b/chrome/browser/devtools/remote_debugging_server.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -19,6 +20,8 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/url_constants.h"
#include "components/devtools_http_handler/devtools_http_handler.h"
#include "components/devtools_http_handler/devtools_http_handler_delegate.h"
#include "components/history/core/browser/top_sites.h"
@@ -177,8 +180,14 @@ RemoteDebuggingServer::RemoteDebuggingServer(const std::string& ip,
PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir);
#endif
+ std::string frontend_url;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kRemoteDebuggingFrontend)) {
+ frontend_url = chrome::kChromeUIDevToolsCustomURL;
+ }
+
devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler(
- base::WrapUnique(new TCPServerSocketFactory(ip, port)), std::string(),
+ base::WrapUnique(new TCPServerSocketFactory(ip, port)), frontend_url,
new ChromeDevToolsHttpHandlerDelegate(), output_dir, debug_frontend_dir,
version_info::GetProductNameAndVersionForUserAgent(), ::GetUserAgent()));
}
« no previous file with comments | « chrome/browser/devtools/frontend/devtools_discovery_page.html ('k') | chrome/browser/ui/webui/devtools_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698