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

Side by Side Diff: chrome/browser/dom_ui/gpu_internals_ui.cc

Issue 6461024: Revert 74292 - Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/dom_ui/flags_ui.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/dom_ui/gpu_internals_ui.h" 5 #include "chrome/browser/dom_ui/gpu_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/browser_thread.h" 22 #include "chrome/browser/browser_thread.h"
23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
24 #include "chrome/browser/gpu_process_host.h" 24 #include "chrome/browser/gpu_process_host.h"
25 #include "chrome/browser/gpu_process_host_ui_shim.h" 25 #include "chrome/browser/gpu_process_host_ui_shim.h"
26 #include "chrome/browser/io_thread.h" 26 #include "chrome/browser/io_thread.h"
27 #include "chrome/browser/net/chrome_net_log.h" 27 #include "chrome/browser/net/chrome_net_log.h"
28 #include "chrome/browser/net/connection_tester.h" 28 #include "chrome/browser/net/connection_tester.h"
29 #include "chrome/browser/net/passive_log_collector.h" 29 #include "chrome/browser/net/passive_log_collector.h"
30 #include "chrome/browser/net/url_fixer_upper.h" 30 #include "chrome/browser/net/url_fixer_upper.h"
31 #include "chrome/browser/platform_util.h" 31 #include "chrome/browser/platform_util.h"
32 #include "chrome/browser/profiles/profile.h"
33 #include "chrome/browser/tab_contents/tab_contents.h"
34 #include "chrome/common/chrome_paths.h" 32 #include "chrome/common/chrome_paths.h"
35 #include "chrome/common/chrome_version_info.h" 33 #include "chrome/common/chrome_version_info.h"
36 #include "chrome/common/jstemplate_builder.h" 34 #include "chrome/common/jstemplate_builder.h"
37 #include "chrome/common/net/url_request_context_getter.h" 35 #include "chrome/common/net/url_request_context_getter.h"
38 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
39 #include "grit/browser_resources.h" 37 #include "grit/browser_resources.h"
40 #include "grit/generated_resources.h" 38 #include "grit/generated_resources.h"
41 #include "net/base/escape.h" 39 #include "net/base/escape.h"
42 #include "ui/base/l10n/l10n_util.h" 40 #include "ui/base/l10n/l10n_util.h"
43 #include "ui/base/resource/resource_bundle.h" 41 #include "ui/base/resource/resource_bundle.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 gpu_info.gl_version_string())); 300 gpu_info.gl_version_string()));
303 basic_info->Append(NewDescriptionValuePair("GL_EXTENSIONS", 301 basic_info->Append(NewDescriptionValuePair("GL_EXTENSIONS",
304 gpu_info.gl_extensions())); 302 gpu_info.gl_extensions()));
305 303
306 DictionaryValue* info = new DictionaryValue(); 304 DictionaryValue* info = new DictionaryValue();
307 info->Set("basic_info", basic_info); 305 info->Set("basic_info", basic_info);
308 306
309 if (gpu_info.level() == GPUInfo::kPartial) { 307 if (gpu_info.level() == GPUInfo::kPartial) {
310 info->SetString("level", "partial"); 308 info->SetString("level", "partial");
311 } else if (gpu_info.level() == GPUInfo::kCompleting) { 309 } else if (gpu_info.level() == GPUInfo::kCompleting) {
312 info->SetString("level", "completing"); 310 info->SetString("level", "completing");
313 } else if (gpu_info.level() == GPUInfo::kComplete) { 311 } else if (gpu_info.level() == GPUInfo::kComplete) {
314 info->SetString("level", "complete"); 312 info->SetString("level", "complete");
315 } else { 313 } else {
316 DCHECK(false) << "Unrecognized GPUInfo::Level value"; 314 DCHECK(false) << "Unrecognized GPUInfo::Level value";
317 info->SetString("level", ""); 315 info->SetString("level", "");
318 } 316 }
319 317
320 #if defined(OS_WIN) 318 #if defined(OS_WIN)
321 if (gpu_info.level() == GPUInfo::kComplete) { 319 if (gpu_info.level() == GPUInfo::kComplete) {
322 ListValue* dx_info = DxDiagNodeToList(gpu_info.dx_diagnostics()); 320 ListValue* dx_info = DxDiagNodeToList(gpu_info.dx_diagnostics());
323 info->Set("diagnostics", dx_info); 321 info->Set("diagnostics", dx_info);
324 } 322 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // GpuInternalsUI 358 // GpuInternalsUI
361 // 359 //
362 //////////////////////////////////////////////////////////////////////////////// 360 ////////////////////////////////////////////////////////////////////////////////
363 361
364 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : DOMUI(contents) { 362 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : DOMUI(contents) {
365 AddMessageHandler((new GpuMessageHandler())->Attach(this)); 363 AddMessageHandler((new GpuMessageHandler())->Attach(this));
366 364
367 GpuHTMLSource* html_source = new GpuHTMLSource(); 365 GpuHTMLSource* html_source = new GpuHTMLSource();
368 366
369 // Set up the chrome://gpu/ source. 367 // Set up the chrome://gpu/ source.
370 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 368 BrowserThread::PostTask(
369 BrowserThread::IO, FROM_HERE,
370 NewRunnableMethod(
371 ChromeURLDataManager::GetInstance(),
372 &ChromeURLDataManager::AddDataSource,
373 make_scoped_refptr(html_source)));
371 } 374 }
372 375
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/flags_ui.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698