Commit 1e92afaa authored by rbpotter's avatar rbpotter Committed by Commit Bot

SplitSettings: More cleanup of about page

- Delete powerwash dialog from browser settings
- Remove settings animated pages, main page behavior, and route
  observer behavior from browser about page

Bug: 990170
Change-Id: I1f2f0a1eb454d55c8f84b7374c7be4e66b238ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1979082
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727019}
parent 0fde3176
......@@ -16,8 +16,6 @@ js_library("about_page") {
":about_page_browser_proxy",
"..:lifetime_browser_proxy",
"..:route",
"../settings_page:main_page_behavior",
"../settings_page:settings_animated_pages",
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js:i18n_behavior",
"//ui/webui/resources/js:parse_html_subset",
......
......@@ -6,8 +6,6 @@
<link rel="import" href="../lifetime_browser_proxy.html">
<link rel="import" href="../prefs/prefs.html">
<link rel="import" href="../route.html">
<link rel="import" href="../settings_page/main_page_behavior.html">
<link rel="import" href="../settings_page/settings_animated_pages.html">
<link rel="import" href="../settings_page/settings_section.html">
<link rel="import" href="../settings_page_css.html">
<link rel="import" href="../settings_shared_css.html">
......@@ -76,105 +74,100 @@
</if>
</style>
<settings-section page-title="$i18n{aboutPageTitle}" section="about">
<settings-animated-pages id="pages" section="about"
focus-config="[[focusConfig_]]">
<div route-path="default">
<div class="settings-box two-line first">
<img id="product-logo" on-click="onProductLogoTap_"
srcset="chrome://theme/current-channel-logo@1x 1x,
chrome://theme/current-channel-logo@2x 2x"
alt="$i18n{aboutProductLogoAlt}"
role="presentation">
<h1 class="product-title">$i18n{aboutProductTitle}</h1>
</div>
<div class="settings-box two-line">
<!-- TODO(dpapad): Investigate why vulcanize does not handle well
a new line after "getThrobberSrcIfUpdating_(", causes incorrect
src URL -->
<!-- Set the icon from the iconset (when it's obsolete/EOL and
when update is done) or set the src (when it's updating). -->
<div class="settings-box two-line first">
<img id="product-logo" on-click="onProductLogoTap_"
srcset="chrome://theme/current-channel-logo@1x 1x,
chrome://theme/current-channel-logo@2x 2x"
alt="$i18n{aboutProductLogoAlt}"
role="presentation">
<h1 class="product-title">$i18n{aboutProductTitle}</h1>
</div>
<div class="settings-box two-line">
<!-- TODO(dpapad): Investigate why vulcanize does not handle well
a new line after "getThrobberSrcIfUpdating_(", causes incorrect
src URL -->
<!-- Set the icon from the iconset (when it's obsolete/EOL and
when update is done) or set the src (when it's updating). -->
<if expr="not chromeos">
<div class="icon-container"
hidden="[[!shouldShowIcons_(showUpdateStatus_)]]">
<iron-icon
icon$="[[getUpdateStatusIcon_(
obsoleteSystemInfo_, currentUpdateStatusEvent_)]]"
src="[[getThrobberSrcIfUpdating_(obsoleteSystemInfo_, currentUpdateStatusEvent_)]]">
</iron-icon>
</div>
<div class="icon-container"
hidden="[[!shouldShowIcons_(showUpdateStatus_)]]">
<iron-icon
icon$="[[getUpdateStatusIcon_(
obsoleteSystemInfo_, currentUpdateStatusEvent_)]]"
src="[[getThrobberSrcIfUpdating_(obsoleteSystemInfo_, currentUpdateStatusEvent_)]]">
</iron-icon>
</div>
</if>
<div class="start padded">
<div class="start padded">
<if expr="not chromeos">
<div id="updateStatusMessage" hidden="[[!showUpdateStatus_]]">
<div
inner-h-t-m-l="[[getUpdateStatusMessage_(
currentUpdateStatusEvent_)]]">
</div>
<a hidden$="[[!shouldShowLearnMoreLink_(
currentUpdateStatusEvent_)]]" target="_blank"
href="https://support.google.com/chrome?p=update_error">
$i18n{learnMore}
</a>
</div>
<span id="deprecationWarning"
hidden="[[!obsoleteSystemInfo_.obsolete]]">
$i18n{aboutObsoleteSystem}
<a href="$i18n{aboutObsoleteSystemURL}" target="_blank">
$i18n{learnMore}
</a>
</span>
<div id="updateStatusMessage" hidden="[[!showUpdateStatus_]]">
<div
inner-h-t-m-l="[[getUpdateStatusMessage_(
currentUpdateStatusEvent_)]]">
</div>
<a hidden$="[[!shouldShowLearnMoreLink_(
currentUpdateStatusEvent_)]]" target="_blank"
href="https://support.google.com/chrome?p=update_error">
$i18n{learnMore}
</a>
</div>
<span id="deprecationWarning"
hidden="[[!obsoleteSystemInfo_.obsolete]]">
$i18n{aboutObsoleteSystem}
<a href="$i18n{aboutObsoleteSystemURL}" target="_blank">
$i18n{learnMore}
</a>
</span>
</if>
<div class="secondary">$i18n{aboutBrowserVersion}</div>
<div class="secondary">$i18n{aboutBrowserVersion}</div>
<if expr="chromeos">
<div class="secondary"
inner-h-t-m-l="[[getUpdateOsSettingsLink_()]]">
</div>
<div class="secondary"
inner-h-t-m-l="[[getUpdateOsSettingsLink_()]]">
</div>
</if>
</div>
</div>
<if expr="not chromeos">
<div class="separator" hidden="[[!showButtonContainer_]]"></div>
<span id="buttonContainer" hidden="[[!showButtonContainer_]]">
<cr-button id="relaunch" hidden="[[!showRelaunch_]]"
on-click="onRelaunchTap_">
$i18n{aboutRelaunch}
</cr-button>
</span>
<div class="separator" hidden="[[!showButtonContainer_]]"></div>
<span id="buttonContainer" hidden="[[!showButtonContainer_]]">
<cr-button id="relaunch" hidden="[[!showRelaunch_]]"
on-click="onRelaunchTap_">
$i18n{aboutRelaunch}
</cr-button>
</span>
</if>
</div>
</div>
<if expr="_google_chrome and is_macosx">
<template is="dom-if" if="[[!promoteUpdaterStatus_.hidden]]">
<div id="promoteUpdater" class="settings-box"
disabled$="[[promoteUpdaterStatus_.disabled]]"
actionable$="[[promoteUpdaterStatus_.actionable]]"
on-click="onPromoteUpdaterTap_">
<div class="start">
[[promoteUpdaterStatus_.text]]
<a href="https://support.google.com/chrome/answer/95414"
target="_blank" id="updaterLearnMore"
on-click="onLearnMoreTap_">
$i18n{learnMore}
</a>
</div>
<cr-icon-button class="subpage-arrow"
hidden$="[[!promoteUpdaterStatus_.actionable]]"
disabled="[[promoteUpdaterStatus_.disabled]]"
aria-label$="[[promoteUpdaterStatus_.text]]"></cr-icon-button>
</div>
</template>
<template is="dom-if" if="[[!promoteUpdaterStatus_.hidden]]">
<div id="promoteUpdater" class="settings-box"
disabled$="[[promoteUpdaterStatus_.disabled]]"
actionable$="[[promoteUpdaterStatus_.actionable]]"
on-click="onPromoteUpdaterTap_">
<div class="start">
[[promoteUpdaterStatus_.text]]
<a href="https://support.google.com/chrome/answer/95414"
target="_blank" id="updaterLearnMore"
on-click="onLearnMoreTap_">
$i18n{learnMore}
</a>
</div>
<cr-icon-button class="subpage-arrow"
hidden$="[[!promoteUpdaterStatus_.actionable]]"
disabled="[[promoteUpdaterStatus_.disabled]]"
aria-label$="[[promoteUpdaterStatus_.text]]"></cr-icon-button>
</div>
</template>
</if>
<cr-link-row class="hr" id="help" on-click="onHelpTap_"
label="$i18n{aboutGetHelpUsingChrome}" external></cr-link-row>
<cr-link-row class="hr" id="help" on-click="onHelpTap_"
label="$i18n{aboutGetHelpUsingChrome}" external></cr-link-row>
<if expr="_google_chrome">
<cr-link-row class="hr" id="reportIssue" on-click="onReportIssueTap_"
hidden="[[!prefs.feedback_allowed.value]]"
label="$i18n{aboutReportAnIssue}" external></cr-link-row>
<cr-link-row class="hr" id="reportIssue" on-click="onReportIssueTap_"
hidden="[[!prefs.feedback_allowed.value]]"
label="$i18n{aboutReportAnIssue}" external></cr-link-row>
</if>
<cr-link-row class="hr" on-click="onManagementPageTap_"
start-icon="cr:domain" label="$i18n{managementPage}"
role-description="$i18n{subpageArrowRoleDescription}"
hidden$="[[!isManaged_]]"></cr-link-row>
</div>
</settings-animated-pages>
<cr-link-row class="hr" on-click="onManagementPageTap_"
start-icon="cr:domain" label="$i18n{managementPage}"
role-description="$i18n{subpageArrowRoleDescription}"
hidden$="[[!isManaged_]]"></cr-link-row>
</settings-section>
<settings-section>
......
......@@ -12,8 +12,6 @@ Polymer({
behaviors: [
WebUIListenerBehavior,
settings.MainPageBehavior,
settings.RouteObserverBehavior,
I18nBehavior,
],
......@@ -107,20 +105,6 @@ Polymer({
// </if>
},
/**
* @param {!settings.Route} newRoute
* @param {settings.Route} oldRoute
*/
currentRouteChanged: function(newRoute, oldRoute) {
settings.MainPageBehavior.currentRouteChanged.call(
this, newRoute, oldRoute);
},
// Override settings.MainPageBehavior method.
containsRoute: function(route) {
return !route || settings.routes.ABOUT.contains(route);
},
// <if expr="not chromeos">
/** @private */
startListening_: function() {
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="../lifetime_browser_proxy.html">
<link rel="import" href="reset_browser_proxy.html">
<link rel="import" href="../settings_shared_css.html">
<dom-module id="settings-powerwash-dialog">
<template>
<style include="settings-shared">
</style>
<cr-dialog id="dialog" close-text="$i18n{close}"
ignore-enter-key>
<div slot="title">$i18n{powerwashDialogTitle}</div>
<div slot="body">
<span>
$i18n{powerwashDialogExplanation}
<a href="$i18nRaw{powerwashLearnMoreUrl}" target="_blank">
$i18n{learnMore}
</a>
</span>
</div>
<div slot="button-container">
<cr-button class="cancel-button" on-click="onCancelTap_"
id="cancel">$i18n{cancel}</cr-button>
<cr-button class="action-button" id="powerwash"
on-click="onRestartTap_">$i18n{powerwashDialogButton}</cr-button>
</div>
</cr-dialog>
</template>
<script src="powerwash_dialog.js"></script>
</dom-module>
// 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-powerwash-dialog' is a dialog shown to request confirmation from
* the user for a device reset (aka powerwash).
*/
Polymer({
is: 'settings-powerwash-dialog',
properties: {
/** @public */
requestTpmFirmwareUpdate: {
type: Boolean,
value: false,
}
},
/** @override */
attached: function() {
settings.ResetBrowserProxyImpl.getInstance().onPowerwashDialogShow();
this.$.dialog.showModal();
},
/** @private */
onCancelTap_: function() {
this.$.dialog.close();
},
/** @private */
onRestartTap_: function() {
settings.LifetimeBrowserProxyImpl.getInstance().factoryReset(
this.requestTpmFirmwareUpdate);
},
});
......@@ -548,12 +548,6 @@
flattenhtml="true"
type="chrome_html" />
</if>
<structure name="IDR_SETTINGS_POWERWASH_DIALOG_HTML"
file="reset_page/powerwash_dialog.html"
type="chrome_html" />
<structure name="IDR_SETTINGS_POWERWASH_DIALOG_JS"
file="reset_page/powerwash_dialog.js"
type="chrome_html" />
<structure name="IDR_SETTINGS_RESET_PAGE_HTML"
file="reset_page/reset_page.html"
type="chrome_html"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment