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

Side by Side Diff: content/shell/shell_devtools_discovery_page.html

Issue 9232077: Add default title for untitled tabs to shell devtools discovery page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Content shell remote debugging</title> 3 <title>Content shell remote debugging</title>
4 <style> 4 <style>
5 </style> 5 </style>
6 6
7 <script> 7 <script>
8 function onLoad() { 8 function onLoad() {
9 var tabs_list_request = new XMLHttpRequest(); 9 var tabs_list_request = new XMLHttpRequest();
10 tabs_list_request.open("GET", "/json" + new Date().getTime(), true); 10 tabs_list_request.open("GET", "/json" + new Date().getTime(), true);
(...skipping 15 matching lines...) Expand all
26 if (item_object.devtoolsFrontendUrl) { 26 if (item_object.devtoolsFrontendUrl) {
27 frontend_ref = document.createElement("a"); 27 frontend_ref = document.createElement("a");
28 frontend_ref.href = item_object.devtoolsFrontendUrl; 28 frontend_ref.href = item_object.devtoolsFrontendUrl;
29 frontend_ref.title = item_object.title; 29 frontend_ref.title = item_object.title;
30 } else { 30 } else {
31 frontend_ref = document.createElement("div"); 31 frontend_ref = document.createElement("div");
32 frontend_ref.title = "The tab already has active debugging session"; 32 frontend_ref.title = "The tab already has active debugging session";
33 } 33 }
34 34
35 var text = document.createElement("div"); 35 var text = document.createElement("div");
36 text.innerText = item_object.title; 36 if (item_object.title)
37 text.innerText = item_object.title;
38 else
39 text.innerText = "(untitled tab)";
37 text.style.cssText = "background-image:url(" + item_object.faviconUrl + ")"; 40 text.style.cssText = "background-image:url(" + item_object.faviconUrl + ")";
38 frontend_ref.appendChild(text); 41 frontend_ref.appendChild(text);
39 42
40 var item = document.createElement("p"); 43 var item = document.createElement("p");
41 item.appendChild(frontend_ref); 44 item.appendChild(frontend_ref);
42 45
43 document.getElementById("items").appendChild(item); 46 document.getElementById("items").appendChild(item);
44 } 47 }
45 </script> 48 </script>
46 </head> 49 </head>
47 <body onload='onLoad()'> 50 <body onload='onLoad()'>
48 <div id='caption'>Inspectable WebContents</div> 51 <div id='caption'>Inspectable WebContents</div>
49 <div id='items'></div> 52 <div id='items'></div>
50 </body> 53 </body>
51 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698