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

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

Issue 13513004: content: Move more constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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
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 25 matching lines...) Expand all
36 36
37 struct GpuFeatureInfo { 37 struct GpuFeatureInfo {
38 std::string name; 38 std::string name;
39 uint32 blocked; 39 uint32 blocked;
40 bool disabled; 40 bool disabled;
41 std::string disabled_description; 41 std::string disabled_description;
42 bool fallback_to_software; 42 bool fallback_to_software;
43 }; 43 };
44 44
45 WebUIDataSource* CreateGpuHTMLSource() { 45 WebUIDataSource* CreateGpuHTMLSource() {
46 WebUIDataSource* source = WebUIDataSource::Create(chrome::kChromeUIGpuHost); 46 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost);
47 47
48 source->SetJsonPath("strings.js"); 48 source->SetJsonPath("strings.js");
49 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); 49 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS);
50 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); 50 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML);
51 return source; 51 return source;
52 } 52 }
53 53
54 base::DictionaryValue* NewDescriptionValuePair(const std::string& desc, 54 base::DictionaryValue* NewDescriptionValuePair(const std::string& desc,
55 const std::string& value) { 55 const std::string& value) {
56 base::DictionaryValue* dict = new base::DictionaryValue(); 56 base::DictionaryValue* dict = new base::DictionaryValue();
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 : WebUIController(web_ui) { 655 : WebUIController(web_ui) {
656 web_ui->AddMessageHandler(new GpuMessageHandler()); 656 web_ui->AddMessageHandler(new GpuMessageHandler());
657 657
658 // Set up the chrome://gpu/ source. 658 // Set up the chrome://gpu/ source.
659 BrowserContext* browser_context = 659 BrowserContext* browser_context =
660 web_ui->GetWebContents()->GetBrowserContext(); 660 web_ui->GetWebContents()->GetBrowserContext();
661 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 661 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
662 } 662 }
663 663
664 } // namespace content 664 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/accessibility_ui.cc ('k') | content/browser/in_process_webkit/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698