OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ui::GuessWindowManagerName())); | 204 ui::GuessWindowManagerName())); |
205 { | 205 { |
206 scoped_ptr<base::Environment> env(base::Environment::Create()); | 206 scoped_ptr<base::Environment> env(base::Environment::Create()); |
207 std::string value; | 207 std::string value; |
208 const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP"; | 208 const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP"; |
209 if (env->GetVar(kXDGCurrentDesktop, &value)) | 209 if (env->GetVar(kXDGCurrentDesktop, &value)) |
210 basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value)); | 210 basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value)); |
211 const char kGDMSession[] = "GDMSESSION"; | 211 const char kGDMSession[] = "GDMSESSION"; |
212 if (env->GetVar(kGDMSession, &value)) | 212 if (env->GetVar(kGDMSession, &value)) |
213 basic_info->Append(NewDescriptionValuePair(kGDMSession, value)); | 213 basic_info->Append(NewDescriptionValuePair(kGDMSession, value)); |
214 const char* kAtomsToCache[] = { | 214 const char* const kAtomsToCache[] = { |
215 "_NET_WM_CM_S0", | 215 "_NET_WM_CM_S0", |
216 NULL | 216 NULL |
217 }; | 217 }; |
218 ui::X11AtomCache atom_cache(gfx::GetXDisplay(), kAtomsToCache); | 218 ui::X11AtomCache atom_cache(gfx::GetXDisplay(), kAtomsToCache); |
219 std::string compositing_manager = XGetSelectionOwner( | 219 std::string compositing_manager = XGetSelectionOwner( |
220 gfx::GetXDisplay(), | 220 gfx::GetXDisplay(), |
221 atom_cache.GetAtom("_NET_WM_CM_S0")) != None ? "Yes" : "No"; | 221 atom_cache.GetAtom("_NET_WM_CM_S0")) != None ? "Yes" : "No"; |
222 basic_info->Append( | 222 basic_info->Append( |
223 NewDescriptionValuePair("Compositing manager", compositing_manager)); | 223 NewDescriptionValuePair("Compositing manager", compositing_manager)); |
224 } | 224 } |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 : WebUIController(web_ui) { | 538 : WebUIController(web_ui) { |
539 web_ui->AddMessageHandler(new GpuMessageHandler()); | 539 web_ui->AddMessageHandler(new GpuMessageHandler()); |
540 | 540 |
541 // Set up the chrome://gpu/ source. | 541 // Set up the chrome://gpu/ source. |
542 BrowserContext* browser_context = | 542 BrowserContext* browser_context = |
543 web_ui->GetWebContents()->GetBrowserContext(); | 543 web_ui->GetWebContents()->GetBrowserContext(); |
544 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 544 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
545 } | 545 } |
546 | 546 |
547 } // namespace content | 547 } // namespace content |
OLD | NEW |