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

Unified Diff: chrome/browser/devtools/frontend/devtools_discovery_page.html

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
« no previous file with comments | « no previous file | chrome/browser/devtools/remote_debugging_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/frontend/devtools_discovery_page.html
diff --git a/chrome/browser/devtools/frontend/devtools_discovery_page.html b/chrome/browser/devtools/frontend/devtools_discovery_page.html
index cf93966c72eec8a1355cdc82b2dcaeb8e2e2ab86..4e6d8c61b0b9fcfae111833a413e246aeb64a04b 100644
--- a/chrome/browser/devtools/frontend/devtools_discovery_page.html
+++ b/chrome/browser/devtools/frontend/devtools_discovery_page.html
@@ -98,24 +98,13 @@ 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 item_element;
if (item_object.devtoolsFrontendUrl) {
item_element = document.createElement('a');
- item_element.href = overrideFrontendUrl(item_object);
+ item_element.href = item_object.devtoolsFrontendUrl;
item_element.title = item_object.title;
+ item_element.addEventListener('click', onItemClicked.bind(null, item_element.href));
} else {
item_element = document.createElement('div');
item_element.className = 'connected';
@@ -148,6 +137,13 @@ function appendItem(item_object) {
document.getElementById('items').appendChild(item_element);
}
+
+function onItemClicked(url, event) {
+ fetch("/json/new?" + url);
+ event.preventDefault();
+ event.stopPropagation();
+}
+
</script>
</head>
<body onload='onLoad()'>
« no previous file with comments | « no previous file | chrome/browser/devtools/remote_debugging_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698