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

Unified Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 541133002: Add XDG_CURRENT_DESKTOP and GDMSESSION env to about:gpu on Linux. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_internals_ui.cc
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index d4e31524e279058e51377ddebb7322c1d816b2a5..2bd80a738428723ba4502fb3703e6a261824086c 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/environment.h"
#include "base/i18n/time_formatting.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -165,10 +166,22 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
gpu_info.gl_ws_version));
basic_info->Append(NewDescriptionValuePair("Window system binding extensions",
gpu_info.gl_ws_extensions));
-#if defined(OS_LINUX) && defined(USE_X11)
+#if defined(OS_LINUX)
+#if defined(USE_X11)
basic_info->Append(NewDescriptionValuePair("Window manager",
ui::GuessWindowManagerName()));
-#endif
+#endif // USE_X11
+ {
Ken Russell (switch to Gerrit) 2014/09/04 21:48:34 This block should go inside the USE_X11 #if guards
Zhenyao Mo 2014/09/04 21:51:54 Done.
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::string value;
+ const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP";
+ if (env->GetVar(kXDGCurrentDesktop, &value))
+ basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value));
+ const char kGDMSession[] = "GDMSESSION";
+ if (env->GetVar(kGDMSession, &value))
+ basic_info->Append(NewDescriptionValuePair(kGDMSession, value));
+ }
+#endif // OS_LINUX
std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
basic_info->Append(
NewDescriptionValuePair("Direct rendering", direct_rendering));
« 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