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

Side by Side Diff: chrome/browser/ui/webui/chromeos/network_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/network_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/network_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 } // namespace 54 } // namespace
55 55
56 NetworkUI::NetworkUI(content::WebUI* web_ui) 56 NetworkUI::NetworkUI(content::WebUI* web_ui)
57 : content::WebUIController(web_ui) { 57 : content::WebUIController(web_ui) {
58 web_ui->AddMessageHandler(new NetworkConfigMessageHandler()); 58 web_ui->AddMessageHandler(new NetworkConfigMessageHandler());
59 web_ui->AddMessageHandler(new NetworkUIMessageHandler()); 59 web_ui->AddMessageHandler(new NetworkUIMessageHandler());
60 60
61 content::WebUIDataSource* html = 61 content::WebUIDataSource* html =
62 content::WebUIDataSource::Create(chrome::kChromeUINetworkHost); 62 content::WebUIDataSource::Create(chrome::kChromeUINetworkHost);
63 html->SetUseJsonJSFormatV2();
64 63
65 html->AddLocalizedString("titleText", IDS_NETWORK_TITLE); 64 html->AddLocalizedString("titleText", IDS_NETWORK_TITLE);
66 html->AddLocalizedString("autoRefreshText", IDS_NETWORK_AUTO_REFRESH); 65 html->AddLocalizedString("autoRefreshText", IDS_NETWORK_AUTO_REFRESH);
67 html->AddLocalizedString("logRefreshText", IDS_NETWORK_LOG_REFRESH); 66 html->AddLocalizedString("logRefreshText", IDS_NETWORK_LOG_REFRESH);
68 html->AddLocalizedString("logLevelShowText", IDS_NETWORK_LOG_LEVEL_SHOW); 67 html->AddLocalizedString("logLevelShowText", IDS_NETWORK_LOG_LEVEL_SHOW);
69 html->AddLocalizedString("logLevelErrorText", IDS_NETWORK_LOG_LEVEL_ERROR); 68 html->AddLocalizedString("logLevelErrorText", IDS_NETWORK_LOG_LEVEL_ERROR);
70 html->AddLocalizedString("logLevelUserText", IDS_NETWORK_LOG_LEVEL_USER); 69 html->AddLocalizedString("logLevelUserText", IDS_NETWORK_LOG_LEVEL_USER);
71 html->AddLocalizedString("logLevelEventText", IDS_NETWORK_LOG_LEVEL_EVENT); 70 html->AddLocalizedString("logLevelEventText", IDS_NETWORK_LOG_LEVEL_EVENT);
72 html->AddLocalizedString("logLevelDebugText", IDS_NETWORK_LOG_LEVEL_DEBUG); 71 html->AddLocalizedString("logLevelDebugText", IDS_NETWORK_LOG_LEVEL_DEBUG);
73 html->AddLocalizedString("logLevelFileinfoText", 72 html->AddLocalizedString("logLevelFileinfoText",
74 IDS_NETWORK_LOG_LEVEL_FILEINFO); 73 IDS_NETWORK_LOG_LEVEL_FILEINFO);
75 html->AddLocalizedString("logLevelTimeDetailText", 74 html->AddLocalizedString("logLevelTimeDetailText",
76 IDS_NETWORK_LOG_LEVEL_TIME_DETAIL); 75 IDS_NETWORK_LOG_LEVEL_TIME_DETAIL);
77 html->AddLocalizedString("logEntryFormat", IDS_NETWORK_LOG_ENTRY); 76 html->AddLocalizedString("logEntryFormat", IDS_NETWORK_LOG_ENTRY);
78 html->SetJsonPath("strings.js"); 77 html->SetJsonPath("strings.js");
79 html->AddResourcePath("network_config.js", IDR_NETWORK_CONFIG_JS); 78 html->AddResourcePath("network_config.js", IDR_NETWORK_CONFIG_JS);
80 html->AddResourcePath("network_ui.css", IDR_NETWORK_UI_CSS); 79 html->AddResourcePath("network_ui.css", IDR_NETWORK_UI_CSS);
81 html->AddResourcePath("network_ui.js", IDR_NETWORK_UI_JS); 80 html->AddResourcePath("network_ui.js", IDR_NETWORK_UI_JS);
82 html->SetDefaultResource(IDR_NETWORK_UI_HTML); 81 html->SetDefaultResource(IDR_NETWORK_UI_HTML);
83 82
84 content::WebUIDataSource::Add( 83 content::WebUIDataSource::Add(
85 web_ui->GetWebContents()->GetBrowserContext(), html); 84 web_ui->GetWebContents()->GetBrowserContext(), html);
86 } 85 }
87 86
88 NetworkUI::~NetworkUI() { 87 NetworkUI::~NetworkUI() {
89 } 88 }
90 89
91 } // namespace chromeos 90 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc ('k') | chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698