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 1efded8c9bcd47b8679e3f84f1ee6cda7fdc73e3..836961946a408c1d6e681789946736849affca89 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" |
@@ -18,6 +19,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/version_info/version_info.h" |
#include "content/public/browser/devtools_agent_host.h" |
#include "content/public/browser/devtools_frontend_host.h" |
@@ -108,9 +111,17 @@ RemoteDebuggingServer::RemoteDebuggingServer(const std::string& ip, |
PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &debug_frontend_dir); |
#endif |
+ std::string frontend_url; |
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
+ if (command_line->HasSwitch( |
+ switches::kRemoteDebuggingFrontend)) { |
+ frontend_url = chrome::kChromeUIDevToolsCustomURL; |
dgozman
2016/10/30 03:14:46
So, this relies on the remote browser to support t
lushnikov
2016/10/31 22:47:26
Done.
|
+ if (command_line->HasSwitch(switches::kEnableDevToolsExperiments)) |
+ frontend_url += "?experiments=true"; |
dgozman
2016/10/30 03:14:46
Can we make hosting browser to add all the paramet
lushnikov
2016/10/31 22:47:26
Done.
|
+ } |
content::DevToolsAgentHost::StartRemoteDebuggingServer( |
base::MakeUnique<TCPServerSocketFactory>(ip, port), |
- std::string(), |
+ frontend_url, |
output_dir, |
debug_frontend_dir, |
version_info::GetProductNameAndVersionForUserAgent(), |