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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 1159623003: Add skeleton UI for sync page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/md_settings_localized_strings_provide r.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
6 6
7 #include "chrome/grit/chromium_strings.h"
7 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/web_ui_data_source.h" 9 #include "content/public/browser/web_ui_data_source.h"
9 10
10 namespace { 11 namespace {
11 12
12 // Note that md_settings.html contains a <script> tag which imports a script of 13 // Note that md_settings.html contains a <script> tag which imports a script of
13 // the following name. These names must be kept in sync. 14 // the following name. These names must be kept in sync.
14 const char kLocalizedStringsFile[] = "strings.js"; 15 const char kLocalizedStringsFile[] = "strings.js";
15 16
16 void AddA11yStrings(content::WebUIDataSource* html_source) { 17 void AddA11yStrings(content::WebUIDataSource* html_source) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 html_source->AddLocalizedString("searchEnginesDomainLabel", 156 html_source->AddLocalizedString("searchEnginesDomainLabel",
156 IDS_SETTINGS_SEARCH_ENGINES_DOMAIN_LABEL); 157 IDS_SETTINGS_SEARCH_ENGINES_DOMAIN_LABEL);
157 html_source->AddLocalizedString("searchEnginesKeywordLabel", 158 html_source->AddLocalizedString("searchEnginesKeywordLabel",
158 IDS_SETTINGS_SEARCH_ENGINES_KEYWORD_LABEL); 159 IDS_SETTINGS_SEARCH_ENGINES_KEYWORD_LABEL);
159 html_source->AddLocalizedString("searchEnginesQueryURLLabel", 160 html_source->AddLocalizedString("searchEnginesQueryURLLabel",
160 IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_LABEL); 161 IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_LABEL);
161 html_source->AddLocalizedString("searchEnginesAddButtonLabel", 162 html_source->AddLocalizedString("searchEnginesAddButtonLabel",
162 IDS_SETTINGS_SEARCH_ENGINES_ADD_BUTTON_LABEL); 163 IDS_SETTINGS_SEARCH_ENGINES_ADD_BUTTON_LABEL);
163 } 164 }
164 165
166 void AddSyncStrings(content::WebUIDataSource* html_source) {
167 html_source->AddLocalizedString("syncPageTitle",
168 IDS_SETTINGS_SYNC_PAGE_TITLE);
169 html_source->AddLocalizedString("syncEverythingMenuOption",
170 IDS_SETTINGS_SYNC_EVERYTHING_MENU_OPTION);
171 html_source->AddLocalizedString("chooseWhatToSyncMenuOption",
172 IDS_SETTINGS_CHOOSE_WHAT_TO_SYNC_MENU_OPTION);
173 html_source->AddLocalizedString("appCheckboxLabel",
174 IDS_SETTINGS_APPS_CHECKBOX_LABEL);
175 html_source->AddLocalizedString("extensionsCheckboxLabel",
176 IDS_SETTINGS_EXTENSIONS_CHECKBOX_LABEL);
177 html_source->AddLocalizedString("settingsCheckboxLabel",
178 IDS_SETTINGS_SETTINGS_CHECKBOX_LABEL);
179 html_source->AddLocalizedString("autofillCheckboxLabel",
180 IDS_SETTINGS_AUTOFILL_CHECKBOX_LABEL);
181 html_source->AddLocalizedString("historyCheckboxLabel",
182 IDS_SETTINGS_HISTORY_CHECKBOX_LABEL);
183 html_source->AddLocalizedString(
184 "themesAndWallpapersCheckboxLabel",
185 IDS_SETTINGS_THEMES_AND_WALLPAPERS_CHECKBOX_LABEL);
186 html_source->AddLocalizedString("bookmarksCheckboxLabel",
187 IDS_SETTINGS_BOOKMARKS_CHECKBOX_LABEL);
188 html_source->AddLocalizedString("passwordsCheckboxLabel",
189 IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL);
190 html_source->AddLocalizedString("openTabsCheckboxLabel",
191 IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL);
192 html_source->AddLocalizedString("encryptionOptionsTitle",
193 IDS_SETTINGS_ENCRYPTION_OPTIONS_TITLE);
194 html_source->AddLocalizedString("syncDataEncryptedText",
195 IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT);
196 html_source->AddLocalizedString(
197 "encryptWithGoogleCredentialsLabel",
198 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL);
199 html_source->AddLocalizedString(
200 "encryptWithSyncPassphraseLabel",
201 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL);
202 html_source->AddLocalizedString(
203 "encryptWithSyncPassphraseLearnMoreLink",
204 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK);
205 html_source->AddLocalizedString("useDefaultSettingsButton",
206 IDS_SETTINGS_USE_DEFAULT_SETTINGS_BUTTON);
207 html_source->AddLocalizedString("cancelButton",
208 IDS_SETTINGS_CANCEL_BUTTON);
209 html_source->AddLocalizedString("okButton",
210 IDS_SETTINGS_OK_BUTTON);
211 }
212
165 void AddUsersStrings(content::WebUIDataSource* html_source) { 213 void AddUsersStrings(content::WebUIDataSource* html_source) {
166 html_source->AddLocalizedString("usersPageTitle", 214 html_source->AddLocalizedString("usersPageTitle",
167 IDS_SETTINGS_USERS_PAGE_TITLE); 215 IDS_SETTINGS_USERS_PAGE_TITLE);
168 html_source->AddLocalizedString("usersModifiedByOwnerLabel", 216 html_source->AddLocalizedString("usersModifiedByOwnerLabel",
169 IDS_SETTINGS_USERS_MODIFIED_BY_OWNER_LABEL); 217 IDS_SETTINGS_USERS_MODIFIED_BY_OWNER_LABEL);
170 html_source->AddLocalizedString("guestBrowsingLabel", 218 html_source->AddLocalizedString("guestBrowsingLabel",
171 IDS_SETTINGS_USERS_GUEST_BROWSING_LABEL); 219 IDS_SETTINGS_USERS_GUEST_BROWSING_LABEL);
172 html_source->AddLocalizedString("supervisedUsersLabel", 220 html_source->AddLocalizedString("supervisedUsersLabel",
173 IDS_SETTINGS_USERS_SUPERVISED_USERS_LABEL); 221 IDS_SETTINGS_USERS_SUPERVISED_USERS_LABEL);
174 html_source->AddLocalizedString("showOnSigninLabel", 222 html_source->AddLocalizedString("showOnSigninLabel",
(...skipping 12 matching lines...) Expand all
187 AddA11yStrings(html_source); 235 AddA11yStrings(html_source);
188 AddAppearanceStrings(html_source); 236 AddAppearanceStrings(html_source);
189 AddCommonStrings(html_source); 237 AddCommonStrings(html_source);
190 AddDownloadsStrings(html_source); 238 AddDownloadsStrings(html_source);
191 AddDateTimeStrings(html_source); 239 AddDateTimeStrings(html_source);
192 #if defined(OS_CHROMEOS) 240 #if defined(OS_CHROMEOS)
193 AddInternetStrings(html_source); 241 AddInternetStrings(html_source);
194 #endif 242 #endif
195 AddSearchStrings(html_source); 243 AddSearchStrings(html_source);
196 AddSearchEnginesStrings(html_source); 244 AddSearchEnginesStrings(html_source);
245 AddSyncStrings(html_source);
197 AddUsersStrings(html_source); 246 AddUsersStrings(html_source);
198 html_source->SetJsonPath(kLocalizedStringsFile); 247 html_source->SetJsonPath(kLocalizedStringsFile);
199 } 248 }
200 249
201 } // namespace settings 250 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/sync_page/sync_page.js ('k') | ui/webui/resources/polymer_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698