diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:06:29 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:06:29 +0000 |
commit | d9ce37d2b375543986b4aa35e92f72b5fe8302a1 (patch) | |
tree | 8ee63720ee690ba57cbd10bc3f46e8b7e76b94cd /chrome | |
parent | 63dadb9e078d03634ed4c29027df92ff219ed8fb (diff) | |
download | chromium_src-d9ce37d2b375543986b4aa35e92f72b5fe8302a1.zip chromium_src-d9ce37d2b375543986b4aa35e92f72b5fe8302a1.tar.gz chromium_src-d9ce37d2b375543986b4aa35e92f72b5fe8302a1.tar.bz2 |
DevTools: remove the --remote-debugging-frontend flag.
R=jam@chromium.org, lushnikov@chromium.org, vsevik@chromium.org
TBR=jam (a simple flag removal)
Review URL: https://codereview.chromium.org/189233008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_process.h | 3 | ||||
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 6 | ||||
-rw-r--r-- | chrome/browser/browser_process_impl.h | 3 | ||||
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 8 | ||||
-rw-r--r-- | chrome/browser/devtools/frontend/devtools_discovery_page.html | 73 | ||||
-rw-r--r-- | chrome/browser/devtools/remote_debugging_server.cc | 5 | ||||
-rw-r--r-- | chrome/browser/devtools/remote_debugging_server.h | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.cc | 3 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.h | 3 |
11 files changed, 53 insertions, 58 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h index 76afbaa..e4531d3 100644 --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h @@ -153,8 +153,7 @@ class BrowserProcess { virtual void CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) = 0; + int port) = 0; virtual unsigned int AddRefModule() = 0; virtual unsigned int ReleaseModule() = 0; diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 9ecbacfb..e87427b 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -552,16 +552,14 @@ AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() { void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) { + int port) { DCHECK(CalledOnValidThread()); #if !defined(OS_ANDROID) // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser // is started with several profiles or existing browser process is reused. if (!remote_debugging_server_.get()) { remote_debugging_server_.reset( - new RemoteDebuggingServer(host_desktop_type, ip, port, - frontend_url)); + new RemoteDebuggingServer(host_desktop_type, ip, port)); } #endif } diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index c433d5b..9120e7c 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -94,8 +94,7 @@ class BrowserProcessImpl : public BrowserProcess, virtual void CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) OVERRIDE; + int port) OVERRIDE; virtual unsigned int AddRefModule() OVERRIDE; virtual unsigned int ReleaseModule() OVERRIDE; virtual bool IsShuttingDown() OVERRIDE; diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 903b1be..f9ee452 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -468,16 +468,10 @@ void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); int port; if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { - std::string frontend_str; - if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) { - frontend_str = command_line.GetSwitchValueASCII( - ::switches::kRemoteDebuggingFrontend); - } g_browser_process->CreateDevToolsHttpProtocolHandler( chrome::HOST_DESKTOP_TYPE_NATIVE, "127.0.0.1", - port, - frontend_str); + port); } else { DLOG(WARNING) << "Invalid http debugger port number " << port; } diff --git a/chrome/browser/devtools/frontend/devtools_discovery_page.html b/chrome/browser/devtools/frontend/devtools_discovery_page.html index 5eaf704..63a0b44 100644 --- a/chrome/browser/devtools/frontend/devtools_discovery_page.html +++ b/chrome/browser/devtools/frontend/devtools_discovery_page.html @@ -9,21 +9,21 @@ body { } #caption { - text-align: left; color: black; font-size: 16px; margin-top: 30px; margin-bottom: 0px; margin-left: 70px; height: 20px; + text-align: left; } #items { display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-lines: multiple; margin-left: 60px; margin-right: 60px; + -webkit-box-orient: horizontal; + -webkit-box-lines: multiple; } .frontend_ref { @@ -32,13 +32,13 @@ body { } .thumbnail { - height: 132px; - width: 212px; background-attachment: scroll; background-origin: padding-box; background-repeat: no-repeat; border: 4px solid rgba(184, 184, 184, 1); border-radius: 5px; + height: 132px; + width: 212px; -webkit-transition-property: background-color, border-color; -webkit-transition: background-color 0.15s, 0.15s; -webkit-transition-delay: 0, 0; @@ -64,27 +64,28 @@ body { margin: 5px; margin-top: 15px; height: 162px; - width: 222px; vertical-align: top; + width: 222px; } .text { - text-align: left; - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; background: no-repeat 0; background-size: 16px; - padding: 2px 0px 0px 20px; + font-size: 12px; margin: 4px 0px 0px 4px; + overflow: hidden; + padding: 2px 0px 0px 20px; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; } </style> <script> + function onLoad() { var tabsListRequest = new XMLHttpRequest(); - tabsListRequest.open("GET", "/json", true); + tabsListRequest.open('GET', '/json/list', true); tabsListRequest.onreadystatechange = onReady; tabsListRequest.send(); } @@ -98,38 +99,50 @@ function onReady() { } } +function overrideFrontendUrl(item) { + if (window.location.hash) { + var overridden_url = window.location.hash.substr(1); + var ws_suffix = item.webSocketDebuggerUrl.replace('ws://', 'ws='); + if (overridden_url.indexOf('?') == -1) + return overridden_url + '?' + ws_suffix; + else + return overridden_url + '&' + ws_suffix; + } + return item.devtoolsFrontendUrl; +} + function appendItem(item_object) { var frontend_ref; if (item_object.devtoolsFrontendUrl) { - frontend_ref = document.createElement("a"); - frontend_ref.href = item_object.devtoolsFrontendUrl; - frontend_ref.title = item_object.title; + frontend_ref = document.createElement('a'); + frontend_ref.href = overrideFrontendUrl(item_object); + frontend_ref.title = item_object.title; } else { - frontend_ref = document.createElement("div"); - frontend_ref.title = "The tab already has an active debug session"; + frontend_ref = document.createElement('div'); + frontend_ref.title = 'The tab already has an active debug session'; } - frontend_ref.className = "frontend_ref"; + frontend_ref.className = 'frontend_ref'; - var thumbnail = document.createElement("div"); + var thumbnail = document.createElement('div'); thumbnail.className = item_object.devtoolsFrontendUrl ? - "thumbnail" : "thumbnail connected"; - thumbnail.style.cssText = "background-image:url(" + + 'thumbnail' : 'thumbnail connected'; + thumbnail.style.cssText = 'background-image:url(' + item_object.thumbnailUrl + - ")"; + ')'; frontend_ref.appendChild(thumbnail); - var text = document.createElement("div"); - text.className = "text"; + var text = document.createElement('div'); + text.className = 'text'; text.innerText = item_object.description || item_object.title; - text.style.cssText = "background-image:url(" + - item_object.faviconUrl + ")"; + text.style.cssText = 'background-image:url(' + + item_object.faviconUrl + ')'; frontend_ref.appendChild(text); - var item = document.createElement("p"); - item.className = "item"; + var item = document.createElement('p'); + item.className = 'item'; item.appendChild(frontend_ref); - document.getElementById("items").appendChild(item); + document.getElementById('items').appendChild(item); } </script> </head> diff --git a/chrome/browser/devtools/remote_debugging_server.cc b/chrome/browser/devtools/remote_debugging_server.cc index 50e43e7..7c98d7f 100644 --- a/chrome/browser/devtools/remote_debugging_server.cc +++ b/chrome/browser/devtools/remote_debugging_server.cc @@ -12,11 +12,10 @@ RemoteDebuggingServer::RemoteDebuggingServer( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) { + int port) { devtools_http_handler_ = content::DevToolsHttpHandler::Start( new net::TCPListenSocketFactory(ip, port), - frontend_url, + "", new BrowserListTabContentsProvider(host_desktop_type)); } diff --git a/chrome/browser/devtools/remote_debugging_server.h b/chrome/browser/devtools/remote_debugging_server.h index 11b2b19..c5ff8b3 100644 --- a/chrome/browser/devtools/remote_debugging_server.h +++ b/chrome/browser/devtools/remote_debugging_server.h @@ -18,8 +18,7 @@ class RemoteDebuggingServer { public: RemoteDebuggingServer(chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url); + int port); virtual ~RemoteDebuggingServer(); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 928ba78..95051f9 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1207,9 +1207,6 @@ const char kQuicVersion[] = "quic-version"; // See also kPlaybackMode. const char kRecordMode[] = "record-mode"; -// Uses custom front-end URL for the remote debugging. -const char kRemoteDebuggingFrontend[] = "remote-debugging-frontend"; - // Enables print preview in the renderer. This flag is generated internally by // Chrome and does nothing when directly passed to the browser. const char kRendererPrintPreview[] = "renderer-print-preview"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index bd8ef26..1d4d0b6 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -330,7 +330,6 @@ extern const char kProxyServer[]; extern const char kQuicMaxPacketLength[]; extern const char kQuicVersion[]; extern const char kRecordMode[]; -extern const char kRemoteDebuggingFrontend[]; extern const char kRendererPrintPreview[]; extern const char kResetAppListInstallState[]; extern const char kResetVariationState[]; diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index dc570aa..20def65 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc @@ -245,8 +245,7 @@ AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) { + int port) { } unsigned int TestingBrowserProcess::AddRefModule() { diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index bb65a4e..ba06d0d 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -87,8 +87,7 @@ class TestingBrowserProcess : public BrowserProcess { virtual void CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port, - const std::string& frontend_url) OVERRIDE; + int port) OVERRIDE; virtual unsigned int AddRefModule() OVERRIDE; virtual unsigned int ReleaseModule() OVERRIDE; virtual bool IsShuttingDown() OVERRIDE; |