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)); |