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

Side by Side Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 540643002: Add WindowManager to about:gpu page on Linux/X11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | ui/base/x/x11_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_internals_ui.h" 5 #include "content/browser/gpu/gpu_internals_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "content/public/common/url_constants.h" 28 #include "content/public/common/url_constants.h"
29 #include "gpu/config/gpu_feature_type.h" 29 #include "gpu/config/gpu_feature_type.h"
30 #include "gpu/config/gpu_info.h" 30 #include "gpu/config/gpu_info.h"
31 #include "third_party/angle/src/common/version.h" 31 #include "third_party/angle/src/common/version.h"
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 #include "ui/base/win/shell.h" 34 #include "ui/base/win/shell.h"
35 #endif 35 #endif
36 36
37 #if defined(OS_LINUX)
piman 2014/09/03 23:21:58 && defined(USE_X11)
Zhenyao Mo 2014/09/04 00:03:57 Done.
38 #include "ui/base/x/x11_util.h"
39 #endif
40
37 namespace content { 41 namespace content {
38 namespace { 42 namespace {
39 43
40 WebUIDataSource* CreateGpuHTMLSource() { 44 WebUIDataSource* CreateGpuHTMLSource() {
41 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost); 45 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost);
42 46
43 source->SetJsonPath("strings.js"); 47 source->SetJsonPath("strings.js");
44 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); 48 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS);
45 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); 49 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML);
46 return source; 50 return source;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 basic_info->Append(NewDescriptionValuePair("GL_VERSION", 154 basic_info->Append(NewDescriptionValuePair("GL_VERSION",
151 gpu_info.gl_version)); 155 gpu_info.gl_version));
152 basic_info->Append(NewDescriptionValuePair("GL_EXTENSIONS", 156 basic_info->Append(NewDescriptionValuePair("GL_EXTENSIONS",
153 gpu_info.gl_extensions)); 157 gpu_info.gl_extensions));
154 basic_info->Append(NewDescriptionValuePair("Window system binding vendor", 158 basic_info->Append(NewDescriptionValuePair("Window system binding vendor",
155 gpu_info.gl_ws_vendor)); 159 gpu_info.gl_ws_vendor));
156 basic_info->Append(NewDescriptionValuePair("Window system binding version", 160 basic_info->Append(NewDescriptionValuePair("Window system binding version",
157 gpu_info.gl_ws_version)); 161 gpu_info.gl_ws_version));
158 basic_info->Append(NewDescriptionValuePair("Window system binding extensions", 162 basic_info->Append(NewDescriptionValuePair("Window system binding extensions",
159 gpu_info.gl_ws_extensions)); 163 gpu_info.gl_ws_extensions));
164 #if defined(OS_LINUX) && defined(USE_X11)
165 basic_info->Append(NewDescriptionValuePair("Window manager",
166 ui::GuessWindowManagerName()));
167 #endif
160 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; 168 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
161 basic_info->Append( 169 basic_info->Append(
162 NewDescriptionValuePair("Direct rendering", direct_rendering)); 170 NewDescriptionValuePair("Direct rendering", direct_rendering));
163 171
164 std::string reset_strategy = 172 std::string reset_strategy =
165 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy); 173 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy);
166 basic_info->Append(NewDescriptionValuePair( 174 basic_info->Append(NewDescriptionValuePair(
167 "Reset notification strategy", reset_strategy)); 175 "Reset notification strategy", reset_strategy));
168 176
169 basic_info->Append(NewDescriptionValuePair( 177 basic_info->Append(NewDescriptionValuePair(
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 : WebUIController(web_ui) { 390 : WebUIController(web_ui) {
383 web_ui->AddMessageHandler(new GpuMessageHandler()); 391 web_ui->AddMessageHandler(new GpuMessageHandler());
384 392
385 // Set up the chrome://gpu/ source. 393 // Set up the chrome://gpu/ source.
386 BrowserContext* browser_context = 394 BrowserContext* browser_context =
387 web_ui->GetWebContents()->GetBrowserContext(); 395 web_ui->GetWebContents()->GetBrowserContext();
388 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 396 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
389 } 397 }
390 398
391 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698