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

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

Issue 189233008: DevTools: remove the --remote-debugging-frontend flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 6 years, 9 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 | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/devtools/remote_debugging_server.h » ('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 5eaf70492fe83bc70e513ac691b62b3dfb5cd683..63a0b44f0fb6bfd326e366cfed68dd42381a0c20 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>
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/devtools/remote_debugging_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698