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

Side by Side Diff: chrome/browser/ui/webui/chromeos/slow_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/chromeos/slow_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/slow_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/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 24 matching lines...) Expand all
35 const char kJsApiTracingPrefChanged[] = "options.Slow.tracingPrefChanged"; 35 const char kJsApiTracingPrefChanged[] = "options.Slow.tracingPrefChanged";
36 36
37 } // namespace 37 } // namespace
38 38
39 namespace chromeos { 39 namespace chromeos {
40 40
41 content::WebUIDataSource* CreateSlowUIHTMLSource() { 41 content::WebUIDataSource* CreateSlowUIHTMLSource() {
42 content::WebUIDataSource* source = 42 content::WebUIDataSource* source =
43 content::WebUIDataSource::Create(chrome::kChromeUISlowHost); 43 content::WebUIDataSource::Create(chrome::kChromeUISlowHost);
44 44
45 source->SetUseJsonJSFormatV2();
46 source->AddLocalizedString("slowDisable", IDS_SLOW_DISABLE); 45 source->AddLocalizedString("slowDisable", IDS_SLOW_DISABLE);
47 source->AddLocalizedString("slowEnable", IDS_SLOW_ENABLE); 46 source->AddLocalizedString("slowEnable", IDS_SLOW_ENABLE);
48 source->AddLocalizedString("slowDescription", IDS_SLOW_DESCRIPTION); 47 source->AddLocalizedString("slowDescription", IDS_SLOW_DESCRIPTION);
49 source->AddLocalizedString("slowWarning", IDS_SLOW_WARNING); 48 source->AddLocalizedString("slowWarning", IDS_SLOW_WARNING);
50 49
51 source->SetJsonPath("strings.js"); 50 source->SetJsonPath("strings.js");
52 source->AddResourcePath("slow.js", IDR_SLOW_JS); 51 source->AddResourcePath("slow.js", IDR_SLOW_JS);
53 source->SetDefaultResource(IDR_SLOW_HTML); 52 source->SetDefaultResource(IDR_SLOW_HTML);
54 return source; 53 return source;
55 } 54 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 127
129 SlowHandler* handler = new SlowHandler(profile); 128 SlowHandler* handler = new SlowHandler(profile);
130 web_ui->AddMessageHandler(handler); 129 web_ui->AddMessageHandler(handler);
131 130
132 // Set up the chrome://slow/ source. 131 // Set up the chrome://slow/ source.
133 content::WebUIDataSource::Add(profile, CreateSlowUIHTMLSource()); 132 content::WebUIDataSource::Add(profile, CreateSlowUIHTMLSource());
134 } 133 }
135 134
136 } // namespace chromeos 135 } // namespace chromeos
137 136
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc ('k') | chrome/browser/ui/webui/components_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698