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

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

Issue 2149323003: Change the way that gzipped resources are loaded from resources.pak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace content { 58 namespace content {
59 namespace { 59 namespace {
60 60
61 WebUIDataSource* CreateGpuHTMLSource() { 61 WebUIDataSource* CreateGpuHTMLSource() {
62 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost); 62 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost);
63 63
64 source->SetJsonPath("strings.js"); 64 source->SetJsonPath("strings.js");
65 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); 65 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS);
66 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); 66 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML);
67 source->DisableI18nAndUseGzipForAllPaths();
67 return source; 68 return source;
68 } 69 }
69 70
70 base::DictionaryValue* NewDescriptionValuePair(const std::string& desc, 71 base::DictionaryValue* NewDescriptionValuePair(const std::string& desc,
71 const std::string& value) { 72 const std::string& value) {
72 base::DictionaryValue* dict = new base::DictionaryValue(); 73 base::DictionaryValue* dict = new base::DictionaryValue();
73 dict->SetString("description", desc); 74 dict->SetString("description", desc);
74 dict->SetString("value", value); 75 dict->SetString("value", value);
75 return dict; 76 return dict;
76 } 77 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 : WebUIController(web_ui) { 546 : WebUIController(web_ui) {
546 web_ui->AddMessageHandler(new GpuMessageHandler()); 547 web_ui->AddMessageHandler(new GpuMessageHandler());
547 548
548 // Set up the chrome://gpu/ source. 549 // Set up the chrome://gpu/ source.
549 BrowserContext* browser_context = 550 BrowserContext* browser_context =
550 web_ui->GetWebContents()->GetBrowserContext(); 551 web_ui->GetWebContents()->GetBrowserContext();
551 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 552 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
552 } 553 }
553 554
554 } // namespace content 555 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_internals_ui.cc ('k') | content/browser/indexed_db/indexed_db_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698