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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 4860001: Collect DirectX diagnostic information asynchronously.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/common/gpu_info.h » ('j') | chrome/gpu/gpu_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 65876)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -761,18 +761,24 @@
GPUInfo gpu_info = GpuProcessHost::Get()->gpu_info();
std::string html;
- if (!gpu_info.initialized()) {
+
+ html.append("<html><head><title>About GPU</title></head>\n");
+
+ if (gpu_info.progress() != GPUInfo::kComplete) {
GpuProcessHostUIShim::Get()->CollectGraphicsInfoAsynchronously();
- // If it's not initialized yet, let the user know and reload the page
- html.append("<html><head><title>About GPU</title></head>\n");
+
+ // If it's not fully initialized yet, set a timeout to reload the page.
html.append("<body onload=\"setTimeout('window.location.reload(true)',");
html.append("2000)\">\n");
- html.append("<h2>GPU Information</h2>\n");
+ } else {
+ html.append("<body>\n");
+ }
+
+ html.append("<h2>GPU Information</h2>\n");
+
+ if (gpu_info.progress() == GPUInfo::kUninitialized) {
html.append("<p>Retrieving GPU information . . .</p>\n");
- html.append("</body></html> ");
} else {
- html.append("<html><head><title>About GPU</title></head><body>\n");
- html.append("<h2>GPU Information</h2>\n");
html.append("<table><tr>");
html.append("<td><strong>Initialization time</strong></td><td>");
html.append(base::Int64ToString(
@@ -799,12 +805,17 @@
html.append("</td></tr></table>");
#if defined(OS_WIN)
+ if (gpu_info.progress() != GPUInfo::kComplete) {
+ html.append("<p>Retrieving DirectX Diagnostics . . .</p>\n");
+ } else {
html.append("<h2>DirectX Diagnostics</h2>");
DxDiagNodeToHTML(&html, gpu_info.dx_diagnostics());
+ }
Ken Russell (switch to Gerrit) 2010/11/13 02:34:45 Indentation of this block is off.
apatrick_chromium 2010/11/15 21:46:25 Done.
#endif
+ }
- html.append("</body></html>");
- }
+ html.append("</body></html>");
+
return html;
}
« no previous file with comments | « no previous file | chrome/common/gpu_info.h » ('j') | chrome/gpu/gpu_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698