diff options
7 files changed, 94 insertions, 0 deletions
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index 54a8f27..2c1d566 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp @@ -102,6 +102,23 @@ </message> + <!-- Passwords and Autofill Page --> + <message name="IDS_SETTINGS_PASSWORDS_AND_AUTOFILL_PAGE_TITLE" desc="Name of the settings page which allows managing passwords and autofill settings."> + Passwords and Forms + </message> + <message name="IDS_SETTINGS_AUTOFILL" desc="Name for the autofill section and toggle."> + Autofill settings + </message> + <message name="IDS_SETTINGS_AUTOFILL_DETAIL" desc="Description of what toggling the 'Autofill' setting does. Immediately underneath IDS_SETTINGS_AUTOFILL"> + Enable Autofill to fill out forms in a single click + </message> + <message name="IDS_SETTINGS_PASSWORDS" desc="Name for the password section and toggle"> + Manage passwords + </message> + <message name="IDS_SETTINGS_PASSWORDS_DETAIL" desc="Description of what toggling the 'Manage passwords' setting does. Immediately underneath IDS_SETTINGS_PASSWORDS"> + Offer to save your web passwords + </message> + <!-- Basic Page --> <message name="IDS_SETTINGS_BASIC" desc="Name of the settings page which displays advanced preferences."> Basic diff --git a/chrome/browser/resources/settings/advanced_page/advanced_page.html b/chrome/browser/resources/settings/advanced_page/advanced_page.html index dffffdb..138fdda 100644 --- a/chrome/browser/resources/settings/advanced_page/advanced_page.html +++ b/chrome/browser/resources/settings/advanced_page/advanced_page.html @@ -1,6 +1,7 @@ <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> <link rel="import" href="chrome://md-settings/downloads_page/downloads_page.html"> <link rel="import" href="chrome://md-settings/languages_page/languages_page.html"> +<link rel="import" href="chrome://md-settings/passwords_and_forms_page/passwords_and_forms_page.html"> <link rel="import" href="chrome://md-settings/privacy_page/privacy_page.html"> <link rel="import" href="chrome://md-settings/reset_page/reset_page.html"> <link rel="import" href="chrome://md-settings/settings_page/settings_section.html"> @@ -36,6 +37,14 @@ </settings-privacy-page> </settings-section> + <settings-section + i18n-values="page-title:passwordsAndAutofillPageTitle" + current-route="[[currentRoute]]" section="passwordsAndForms"> + <settings-passwords-and-forms-page prefs="{{prefs}}" + current-route="{{currentRoute}}"> + </settings-passwords-and-forms-page> + </settings-section> + <settings-section i18n-values="page-title:languagesPageTitle" current-route="[[currentRoute]]" section="languages"> <settings-languages-page prefs="{{prefs}}" diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.css b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.css new file mode 100644 index 0000000..8fcdf8f --- /dev/null +++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.css @@ -0,0 +1,8 @@ +/* Copyright 2015 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +.option-value { + color: gray; + font-size: 80%; +} diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.html b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.html new file mode 100644 index 0000000..47c54a4 --- /dev/null +++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.html @@ -0,0 +1,20 @@ +<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.html"> + +<dom-module id="settings-passwords-and-forms-page"> + <link rel="import" type="css" + href="chrome://md-settings/settings_page/settings_page.css"> + <link rel="import" type="css" + href="chrome://md-settings/passwords_and_forms_page/passwords_and_forms_page.css"> + <template> + <paper-item-body two-line class="flex"> + <div i18n-content="autofill"></div> + <div class="option-value" i18n-content="autofillDetail"></div> + </paper-item> + <paper-item-body two-line class="flex"> + <div i18n-content="passwords"></div> + <div class="option-value" i18n-content="passwordsDetail"></div> + </paper-item> + </template> + <script src="passwords_and_forms_page.js"></script> +</dom-module> diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js new file mode 100644 index 0000000..7dcb050 --- /dev/null +++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.js @@ -0,0 +1,18 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/** + * @fileoverview 'settings-passwords-and-forms-page' is the settings page + * for passwords and auto fill. + * + * @group Chrome Settings Elements + * @element settings-passwords-and-forms-page + */ +(function() { +'use strict'; + +Polymer({ + is: 'settings-passwords-and-forms-page', +}); +})(); diff --git a/chrome/browser/resources/settings/settings_resources.grd b/chrome/browser/resources/settings/settings_resources.grd index 5096068..7abdbe9 100644 --- a/chrome/browser/resources/settings/settings_resources.grd +++ b/chrome/browser/resources/settings/settings_resources.grd @@ -282,6 +282,15 @@ file="languages_page/edit_dictionary_page.js" type="chrome_html" /> </if> + <structure name="IDR_SETTINGS_PASSWORDS_AND_FORMS_PAGE_CSS" + file="passwords_and_forms_page/passwords_and_forms_page.css" + type="chrome_html" /> + <structure name="IDR_SETTINGS_PASSWORDS_AND_FORMS_PAGE_HTML" + file="passwords_and_forms_page/passwords_and_forms_page.html" + type="chrome_html" /> + <structure name="IDR_SETTINGS_PASSWORDS_AND_FORMS_PAGE_JS" + file="passwords_and_forms_page/passwords_and_forms_page.js" + type="chrome_html" /> <structure name="IDR_SETTINGS_PREFS_HTML" file="prefs/prefs.html" type="chrome_html" /> diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc index 768313c..4c7281f 100644 --- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc @@ -379,6 +379,18 @@ void AddOnStartupStrings(content::WebUIDataSource* html_source) { IDS_SETTINGS_ON_STARTUP_ENTER_URL); } +void AddPasswordsAndFormsStrings(content::WebUIDataSource* html_source) { + html_source->AddLocalizedString( + "passwordsAndAutofillPageTitle", + IDS_SETTINGS_PASSWORDS_AND_AUTOFILL_PAGE_TITLE); + html_source->AddLocalizedString("autofill", IDS_SETTINGS_AUTOFILL); + html_source->AddLocalizedString("autofillDetail", + IDS_SETTINGS_AUTOFILL_DETAIL); + html_source->AddLocalizedString("passwords", IDS_SETTINGS_PASSWORDS); + html_source->AddLocalizedString("passwordsDetail", + IDS_SETTINGS_PASSWORDS_DETAIL); +} + void AddPrivacyStrings(content::WebUIDataSource* html_source) { html_source->AddLocalizedString("privacyPageTitle", IDS_SETTINGS_PRIVACY); @@ -691,6 +703,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, AddMultiProfilesStrings(html_source, profile); #endif AddOnStartupStrings(html_source); + AddPasswordsAndFormsStrings(html_source); AddPrivacyStrings(html_source); AddResetStrings(html_source); AddSearchEnginesStrings(html_source); |