summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordschuyler <dschuyler@chromium.org>2016-03-11 14:10:41 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-11 22:12:21 +0000
commit2d4b02bdc8617296acb108c67ccaa246ef2f37ee (patch)
tree22116e9acb269b65fe063dbeb0179e2ce5e2b6e4
parent42eb6b5a23730d5c52a2cecd797cbc19dbbf6fd0 (diff)
downloadchromium_src-2d4b02bdc8617296acb108c67ccaa246ef2f37ee.zip
chromium_src-2d4b02bdc8617296acb108c67ccaa246ef2f37ee.tar.gz
chromium_src-2d4b02bdc8617296acb108c67ccaa246ef2f37ee.tar.bz2
[MD settings] reorder and update settings sections
This CL reorders the sections in the MD settings to more closely match the order listed in the Combined Chrome Settings Hierarchy doc. The entries in the side nav have also been reordered and some menu items were added to flesh out the full menu (even though the sections are not complete). There are some TODOs for icons that will happen in a later CL. BUG=593989 Review URL: https://codereview.chromium.org/1779423002 Cr-Commit-Position: refs/heads/master@{#380749}
-rw-r--r--chrome/app/settings_chromium_strings.grdp5
-rw-r--r--chrome/app/settings_google_chrome_strings.grdp12
-rw-r--r--chrome/app/settings_strings.grdp13
-rw-r--r--chrome/browser/resources/settings/advanced_page/advanced_page.html16
-rw-r--r--chrome/browser/resources/settings/basic_page/basic_page.html31
-rw-r--r--chrome/browser/resources/settings/settings_menu/settings_menu.html34
-rw-r--r--chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc64
7 files changed, 119 insertions, 56 deletions
diff --git a/chrome/app/settings_chromium_strings.grdp b/chrome/app/settings_chromium_strings.grdp
index 3a07c5b..5098bd3 100644
--- a/chrome/app/settings_chromium_strings.grdp
+++ b/chrome/app/settings_chromium_strings.grdp
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Settings-specific Chromium strings (included from chromium_strings.grd). -->
<grit-part>
+ <!-- About Page -->
+ <message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Chromium page.">
+ About Chromium
+ </message>
+
<!-- Default Browser Page -->
<if expr="not chromeos">
<message name="IDS_SETTINGS_DEFAULT_BROWSER_DEFAULT" desc="The text displayed when Chrome is not the default browser">
diff --git a/chrome/app/settings_google_chrome_strings.grdp b/chrome/app/settings_google_chrome_strings.grdp
index d4a7e4f..23ddc7f 100644
--- a/chrome/app/settings_google_chrome_strings.grdp
+++ b/chrome/app/settings_google_chrome_strings.grdp
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Settings-specific Google Chrome strings (included from google_chrome_strings.grd). -->
<grit-part>
+ <!-- About Page -->
+ <if expr="chromeos">
+ <message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Chrome OS page.">
+ About Chrome OS
+ </message>
+ </if>
+ <if expr="not chromeos">
+ <message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Chrome page.">
+ About Chrome
+ </message>
+ </if>
+
<!-- Default Browser Page -->
<if expr="not chromeos">
<message name="IDS_SETTINGS_DEFAULT_BROWSER_DEFAULT" desc="The text displayed when Chrome is not the default browser">
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index 5120d6c..bbeddb0 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -6,11 +6,11 @@
This setting is controlled by extension <ph name="NAME">$1<ex>Settings Extension</ex></ph>
</message>
+ <!-- Accessibility Page -->
+ <message name="IDS_SETTINGS_ACCESSIBILITY" desc="Name of the settings page which displays accessibility preferences.">
+ Accessibility
+ </message>
<if expr="chromeos">
- <!-- Accessibility Page -->
- <message name="IDS_SETTINGS_ACCESSIBILITY" desc="Name of the settings page which displays accessibility preferences.">
- Accessibility
- </message>
<message name="IDS_SETTINGS_MORE_FEATURES_LINK" desc="Link which opens page where users can install extensions which provide additional accessibility features.">
Add additional accessibility features
</message>
@@ -335,6 +335,11 @@
This clears synced data from all devices.
</message>
+ <!-- Cloud Print -->
+ <message name="IDS_SETTINGS_GOOGLE_CLOUD_PRINT" desc="Label for the Google cloud print page and menu option.">
+ Google cloud print
+ </message>
+
<!-- Downloads Page -->
<message name="IDS_SETTINGS_DOWNLOADS" desc="Name of the settings page which displays download preferences.">
Downloads
diff --git a/chrome/browser/resources/settings/advanced_page/advanced_page.html b/chrome/browser/resources/settings/advanced_page/advanced_page.html
index 29044ff..369584e 100644
--- a/chrome/browser/resources/settings/advanced_page/advanced_page.html
+++ b/chrome/browser/resources/settings/advanced_page/advanced_page.html
@@ -50,7 +50,6 @@
</settings-section>
</template>
</if>
-
<template is="dom-if" if="[[showPage(pageVisibility.passwordsAndForms)]]"
restamp>
<settings-section
@@ -76,12 +75,9 @@
</settings-downloads-page>
</settings-section>
</template>
- <template is="dom-if" if="[[showPage(pageVisibility.reset)]]" restamp>
- <settings-section page-title="[[i18n('resetPageTitle')]]"
- current-route="[[currentRoute]]" section="reset">
- <settings-reset-page></settings-reset-page>
- </settings-section>
- </template>
+
+ <!-- TODO(dschuyler): Add Google Cloud Print section here. -->
+
<if expr="chromeos">
<!-- TODO(dbeam): find somewhere to stuff "Add more accessibility features"
on desktop. -->
@@ -100,6 +96,12 @@
</settings-section>
</template>
</if>
+ <template is="dom-if" if="[[showPage(pageVisibility.reset)]]" restamp>
+ <settings-section page-title="[[i18n('resetPageTitle')]]"
+ current-route="[[currentRoute]]" section="reset">
+ <settings-reset-page></settings-reset-page>
+ </settings-section>
+ </template>
</template>
<script src="chrome://md-settings/advanced_page/advanced_page.js"></script>
</dom-module>
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html
index 54971fa..70d0d4e 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.html
+++ b/chrome/browser/resources/settings/basic_page/basic_page.html
@@ -24,13 +24,6 @@
<settings-reset-profile-banner on-reset-done="onResetDone_">
</settings-reset-profile-banner>
</template>
- <template is="dom-if" if="[[showPage(pageVisibility.people)]]" restamp>
- <settings-section page-title="[[i18n('peoplePageTitle')]]"
- current-route="[[currentRoute]]" section="people">
- <settings-people-page prefs="{{prefs}}" current-route="{{currentRoute}}">
- </settings-people-page>
- </settings-section>
- </template>
<if expr="chromeos">
<template is="dom-if" if="[[showPage(pageVisibility.internet)]]" restamp>
<settings-section page-title="[[i18n('internetPageTitle')]]"
@@ -40,6 +33,22 @@
</settings-section>
</template>
</if>
+ <template is="dom-if" if="[[showPage(pageVisibility.people)]]" restamp>
+ <settings-section page-title="[[i18n('peoplePageTitle')]]"
+ current-route="[[currentRoute]]" section="people">
+ <settings-people-page prefs="{{prefs}}"
+ current-route="{{currentRoute}}">
+ </settings-people-page>
+ </settings-section>
+ </template>
+ <template is="dom-if" if="[[showPage(pageVisibility.onStartup)]]" restamp>
+ <settings-section page-title="[[i18n('onStartup')]]"
+ current-route="[[currentRoute]]" section="onStartup">
+ <settings-on-startup-page prefs="{{prefs}}"
+ current-route="{{currentRoute}}">
+ </settings-on-startup-page>
+ </settings-section>
+ </template>
<template is="dom-if" if="[[showPage(pageVisibility.appearance)]]" restamp>
<settings-section page-title="[[i18n('appearancePageTitle')]]"
current-route="[[currentRoute]]" section="appearance">
@@ -58,14 +67,6 @@
</settings-section>
</template>
</if>
- <template is="dom-if" if="[[showPage(pageVisibility.onStartup)]]" restamp>
- <settings-section page-title="[[i18n('onStartup')]]"
- current-route="[[currentRoute]]" section="onStartup">
- <settings-on-startup-page prefs="{{prefs}}"
- current-route="{{currentRoute}}">
- </settings-on-startup-page>
- </settings-section>
- </template>
<template is="dom-if" if="[[showPage(pageVisibility.search)]]" restamp>
<settings-section page-title="[[i18n('searchPageTitle')]]"
current-route="[[currentRoute]]" section="search">
diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html
index 1921c50..6f664bb 100644
--- a/chrome/browser/resources/settings/settings_menu/settings_menu.html
+++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html
@@ -79,13 +79,20 @@
<span i18n-content="peoplePageTitle"></span>
</div>
<div>
+ <iron-icon icon="image:brightness-1" item-icon></iron-icon>
+ <span i18n-content="onStartup"></span>
+ </div>
+ <div>
<iron-icon icon="home" item-icon></iron-icon>
<span i18n-content="appearancePageTitle"></span>
</div>
+<if expr="chromeos">
<div>
+ <!-- TODO(dschuyler): replace brightness-1 placeholder icon -->
<iron-icon icon="image:brightness-1" item-icon></iron-icon>
- <span i18n-content="onStartup"></span>
+ <span i18n-content="devicePageTitle"></span>
</div>
+</if>
<div>
<iron-icon icon="search" item-icon></iron-icon>
<span i18n-content="searchPageTitle"></span>
@@ -106,10 +113,6 @@
</iron-icon>
</div>
<paper-menu class="menu-content">
- <div>
- <iron-icon icon="communication:location-on" item-icon></iron-icon>
- <span i18n-content="siteSettingsLocation"></span>
- </div>
<if expr="chromeos">
<div>
<iron-icon icon="device:access-time" item-icon></iron-icon>
@@ -139,17 +142,32 @@
<span i18n-content="downloadsPageTitle"></span>
</div>
<div>
- <iron-icon icon="settings-backup-restore" item-icon></iron-icon>
- <span i18n-content="resetPageTitle"></span>
+ <!-- TODO(dschuyler): replace brightness-1 placeholder icon -->
+ <iron-icon icon="image:brightness-1" item-icon></iron-icon>
+ <span i18n-content="googleCloudPrint"></span>
</div>
-<if expr="chromeos">
<div>
<iron-icon icon="accessibility" item-icon></iron-icon>
<span i18n-content="a11yPageTitle"></span>
</div>
+<if expr="not chromeos">
+ <div>
+ <!-- TODO(dschuyler): replace brightness-1 placeholder icon -->
+ <iron-icon icon="image:brightness-1" item-icon></iron-icon>
+ <span i18n-content="systemPageTitle"></span>
+ </div>
</if>
+ <div>
+ <iron-icon icon="settings-backup-restore" item-icon></iron-icon>
+ <span i18n-content="resetPageTitle"></span>
+ </div>
</paper-menu>
</paper-submenu>
+ <paper-submenu on-tap="openPage_">
+ <div class="menu-trigger">
+ <span i18n-content="aboutProgram"></span>
+ </div>
+ </paper-submenu>
</paper-menu>
</template>
<script src="settings_menu.js"></script>
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 797b51a..089b8ee 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
@@ -69,36 +69,46 @@ void AddCommonStrings(content::WebUIDataSource* html_source) {
arraysize(localized_strings));
}
-#if defined(OS_CHROMEOS)
void AddA11yStrings(content::WebUIDataSource* html_source) {
LocalizedString localized_strings[] = {
- {"a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY},
- {"moreFeaturesLink", IDS_SETTINGS_MORE_FEATURES_LINK},
- {"optionsInMenuLabel", IDS_SETTINGS_OPTIONS_IN_MENU_LABEL},
- {"largeMouseCursorLabel", IDS_SETTINGS_LARGE_MOUSE_CURSOR_LABEL},
- {"highContrastLabel", IDS_SETTINGS_HIGH_CONTRAST_LABEL},
- {"stickyKeysLabel", IDS_SETTINGS_STICKY_KEYS_LABEL},
- {"chromeVoxLabel", IDS_SETTINGS_CHROMEVOX_LABEL},
- {"screenMagnifierLabel", IDS_SETTINGS_SCREEN_MAGNIFIER_LABEL},
- {"tapDraggingLabel", IDS_SETTINGS_TAP_DRAGGING_LABEL},
- {"clickOnStopLabel", IDS_SETTINGS_CLICK_ON_STOP_LABEL},
- {"delayBeforeClickLabel", IDS_SETTINGS_DELAY_BEFORE_CLICK_LABEL},
- {"delayBeforeClickExtremelyShort",
- IDS_SETTINGS_DELAY_BEFORE_CLICK_EXTREMELY_SHORT},
- {"delayBeforeClickVeryShort", IDS_SETTINGS_DELAY_BEFORE_CLICK_VERY_SHORT},
- {"delayBeforeClickShort", IDS_SETTINGS_DELAY_BEFORE_CLICK_SHORT},
- {"delayBeforeClickLong", IDS_SETTINGS_DELAY_BEFORE_CLICK_LONG},
- {"delayBeforeClickVeryLong", IDS_SETTINGS_DELAY_BEFORE_CLICK_VERY_LONG},
- {"onScreenKeyboardLabel", IDS_SETTINGS_ON_SCREEN_KEYBOARD_LABEL},
- {"a11yExplanation", IDS_SETTINGS_ACCESSIBILITY_EXPLANATION},
+ {"a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY},
+#if defined(OS_CHROMEOS)
+ {"moreFeaturesLink", IDS_SETTINGS_MORE_FEATURES_LINK},
+ {"optionsInMenuLabel", IDS_SETTINGS_OPTIONS_IN_MENU_LABEL},
+ {"largeMouseCursorLabel", IDS_SETTINGS_LARGE_MOUSE_CURSOR_LABEL},
+ {"highContrastLabel", IDS_SETTINGS_HIGH_CONTRAST_LABEL},
+ {"stickyKeysLabel", IDS_SETTINGS_STICKY_KEYS_LABEL},
+ {"chromeVoxLabel", IDS_SETTINGS_CHROMEVOX_LABEL},
+ {"screenMagnifierLabel", IDS_SETTINGS_SCREEN_MAGNIFIER_LABEL},
+ {"tapDraggingLabel", IDS_SETTINGS_TAP_DRAGGING_LABEL},
+ {"clickOnStopLabel", IDS_SETTINGS_CLICK_ON_STOP_LABEL},
+ {"delayBeforeClickLabel", IDS_SETTINGS_DELAY_BEFORE_CLICK_LABEL},
+ {"delayBeforeClickExtremelyShort",
+ IDS_SETTINGS_DELAY_BEFORE_CLICK_EXTREMELY_SHORT},
+ {"delayBeforeClickVeryShort", IDS_SETTINGS_DELAY_BEFORE_CLICK_VERY_SHORT},
+ {"delayBeforeClickShort", IDS_SETTINGS_DELAY_BEFORE_CLICK_SHORT},
+ {"delayBeforeClickLong", IDS_SETTINGS_DELAY_BEFORE_CLICK_LONG},
+ {"delayBeforeClickVeryLong", IDS_SETTINGS_DELAY_BEFORE_CLICK_VERY_LONG},
+ {"onScreenKeyboardLabel", IDS_SETTINGS_ON_SCREEN_KEYBOARD_LABEL},
+ {"a11yExplanation", IDS_SETTINGS_ACCESSIBILITY_EXPLANATION},
+#endif
};
AddLocalizedStringsBulk(html_source, localized_strings,
arraysize(localized_strings));
+#if defined(OS_CHROMEOS)
html_source->AddString("a11yLearnMoreUrl",
chrome::kChromeAccessibilityHelpURL);
-}
#endif
+}
+
+void AddAboutStrings(content::WebUIDataSource* html_source) {
+ LocalizedString localized_strings[] = {
+ {"aboutProgram", IDS_SETTINGS_ABOUT_PROGRAM},
+ };
+ AddLocalizedStringsBulk(html_source, localized_strings,
+ arraysize(localized_strings));
+}
#if defined(OS_CHROMEOS)
void AddAccountUITweaksStrings(content::WebUIDataSource* html_source,
@@ -247,6 +257,14 @@ void AddClearBrowsingDataStrings(content::WebUIDataSource* html_source) {
arraysize(localized_strings));
}
+void AddCloudPrintStrings(content::WebUIDataSource* html_source) {
+ LocalizedString localized_strings[] = {
+ {"googleCloudPrint", IDS_SETTINGS_GOOGLE_CLOUD_PRINT},
+ };
+ AddLocalizedStringsBulk(html_source, localized_strings,
+ arraysize(localized_strings));
+}
+
#if !defined(OS_CHROMEOS)
void AddDefaultBrowserStrings(content::WebUIDataSource* html_source) {
LocalizedString localized_strings[] = {
@@ -784,8 +802,9 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source,
Profile* profile) {
AddCommonStrings(html_source);
-#if defined(OS_CHROMEOS)
AddA11yStrings(html_source);
+ AddAboutStrings(html_source);
+#if defined(OS_CHROMEOS)
AddAccountUITweaksStrings(html_source, profile);
#endif
AddAppearanceStrings(html_source);
@@ -794,6 +813,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source,
#endif
AddCertificateManagerStrings(html_source);
AddClearBrowsingDataStrings(html_source);
+ AddCloudPrintStrings(html_source);
#if !defined(OS_CHROMEOS)
AddDefaultBrowserStrings(html_source);
#endif