Commit 74b7f4ed authored by Yue Li's avatar Yue Li Committed by Commit Bot

Update assistant optin style with detailed specs

Also removed the confirm reject screen upon UX's request.

Bug: b/78190629
Test: Manual Test
Change-Id: If2f97cb5e8302932fa96e0378ac3fd760d49feae
Reviewed-on: https://chromium-review.googlesource.com/1176588Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Yue Li <updowndota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583795}
parent 6cd1c82f
...@@ -4852,24 +4852,6 @@ ...@@ -4852,24 +4852,6 @@
<message name="IDS_ASSISTANT_THIRD_PARTY_SCREEN_TITLE" desc="Title for assitant third party screen."> <message name="IDS_ASSISTANT_THIRD_PARTY_SCREEN_TITLE" desc="Title for assitant third party screen.">
Google Partners work with your Assistant to help you Google Partners work with your Assistant to help you
</message> </message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_TITLE" desc="Title for assistant confirm screen.">
Get the full Assistant experience with these settings
</message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_TITLE" desc="Title for accept assistant confirm screen.">
Yes I'm In
</message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_MESSAGE" desc="Message for accept assistant confirm screen.">
To help you with your calendar, reminders, flights and more, your Assistant needs the Web &amp; App Activity, Device Information, Voice &amp; Audio Activity settings.
</message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_MESSAGE_EXPANDED" desc="Extra message for accept assistant confirm screen.">
Note: The data these settings control may be saved and used in any Google service where you are signed in to give you personalized experiences and useful ads. You can see your data, delete it and change your settings at account.google.com.
</message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_REJECT_TITLE" desc="Title for reject assistant confirm screen.">
No Thanks
</message>
<message name="IDS_ASSISTANT_CONFIRM_SCREEN_REJECT_MESSAGE" desc="Message for reject assistant confirm screen.">
Depending on your account settings, your Assistant experience may be limited to things like web results, jokes, and local info.
</message>
<message name="IDS_ASSISTANT_CONTINUE_BUTTON" desc="Continue button for asssitant optin flow."> <message name="IDS_ASSISTANT_CONTINUE_BUTTON" desc="Continue button for asssitant optin flow.">
Continue Continue
</message> </message>
......
/* Copyright 2018 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. */
.message {
color: rgba(0, 0, 0, .8);
font-size: 13px;
padding-top: 6px;
}
.content {
padding-top: 6px;
}
#accept,
#reject {
align-items: unset;
padding: 10px 0 10px 0;
}
#confirm-reject-img {
display: block;
height: 150px;
margin: auto;
}
<!-- Copyright 2018 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. -->
<link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper-radio-group.html">
<dom-module id="assistant-confirm-reject">
<template>
<link rel="stylesheet" href="../login/oobe_flex_layout.css">
<link rel="stylesheet" href="assistant_confirm_reject.css">
<link rel="stylesheet" href="assistant_shared_styles.css">
<oobe-dialog id="confirm-reject-dialog" role="dialog" has-buttons
hide-shadow no-footer-padding no-header>
<div slot="footer">
<div class="container">
<img id="logo" src="assistant_logo.png">
<div class="title" id="title-text"></div>
<img id="confirm-reject-img" src="assistant_confirm_reject.svg">
<paper-radio-group selected="accept" selectable="cr-radio-button">
<cr-radio-button id="accept" name="accept">
<div class="sub-title" id="accept-title-text"></div>
<div class="message" id="accept-message-text"></div>
<div class="content" id="accept-message-extra-text"></div>
</cr-radio-button>
<cr-radio-button id="reject" name="reject">
<div class="sub-title" id="reject-title-text"></div>
<div class="message" id="reject-message-text"></div>
</cr-radio-button>
</paper-radio-group>
</div>
</div>
<div slot="bottom-buttons" class="flex layout horizontal">
<div class="flex"></div>
<oobe-text-button id="next-button" inverse on-tap="onNextTap_"
disabled="[[buttonsDisabled]]" hidden="[[moreContents]]">
<div id="next-button-text"></div>
</oobe-text-button>
</div>
</oobe-dialog>
</template>
</dom-module>
// Copyright 2018 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 Polymer element for displaying material design assistant
* confirm reject screen.
*
* Event 'loading' will be fired when the page is loading/reloading.
* Event 'loaded' will be fired when the page has been successfully loaded.
*/
Polymer({
is: 'assistant-confirm-reject',
behaviors: [OobeDialogHostBehavior],
properties: {
/**
* Buttons are disabled when the page content is loading.
*/
buttonsDisabled: {
type: Boolean,
value: true,
},
},
/**
* Whether all the screen content has been successfully loaded.
* @type {boolean}
* @private
*/
pageLoaded_: false,
/**
* On-tap event handler for next button.
*
* @private
*/
onNextTap_: function() {
var confirmResult = this.$['accept'].getAttribute('checked') != null;
chrome.send('AssistantConfirmRejectScreen.userActed', [confirmResult]);
},
/**
* Reloads the page.
*/
reloadPage: function() {
this.fire('loading');
this.buttonsDisabled = true;
},
/**
* Reload the page with the given consent string text data.
*/
reloadContent: function(data) {
this.$['title-text'].textContent = data['confirmRejectTitle'];
this.$['next-button-text'].textContent =
data['confirmRejectContinueButton'];
this.$['accept-title-text'].textContent = data['confirmRejectAcceptTitle'];
this.$['accept-message-text'].textContent =
data['confirmRejectAcceptMessage'];
this.$['accept-message-extra-text'].textContent =
data['confirmRejectAcceptMessageExpanded'];
this.$['reject-title-text'].textContent = data['confirmRejectRejectTitle'];
this.$['reject-message-text'].textContent =
data['confirmRejectRejectMessage'];
this.pageLoaded_ = true;
this.onPageLoaded();
},
/**
* Handles event when all the page content has been loaded.
*/
onPageLoaded: function() {
this.fire('loaded');
this.buttonsDisabled = false;
this.$['next-button'].focus();
},
/**
* Signal from host to show the screen.
*/
onShow: function() {
if (!this.pageLoaded_) {
this.reloadPage();
} else {
this.$['next-button'].focus();
}
},
});
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in the LICENSE file. */ * found in the LICENSE file. */
#intro-text { #intro-text {
padding-bottom: 48px; padding-bottom: 58px;
} }
p { p {
......
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
<div class="container"> <div class="container">
<img id="logo" src="assistant_logo.png"> <img id="logo" src="assistant_logo.png">
<div class="title" id="title-text"></div> <div class="title" id="title-text"></div>
<div class="sub-title" id="intro-text"></div> <div class="content" id="intro-text"></div>
<div class="line"></div> <div class="line"></div>
<div id="insertion-point"></div> <div id="insertion-point"></div>
</div> </div>
</div> </div>
<div slot="bottom-buttons" class="flex layout horizontal"> <div slot="bottom-buttons" class="flex layout horizontal">
<div class="flex"></div> <div class="flex"></div>
<oobe-text-button id="next-button" inverse on-tap="onNextTap_" <oobe-next-button id="next-button" inverse on-tap="onNextTap_"
disabled="[[buttonsDisabled]]" hidden="[[moreContents]]"> disabled="[[buttonsDisabled]]" hidden="[[moreContents]]">
<div id="next-button-text"></div> <div id="next-button-text"></div>
</oobe-text-button> </oobe-next-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
</template> </template>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */ * found in the LICENSE file. */
#retry-button { oobe-text-button {
display: none; display: none;
} }
.error #retry-button { .error oobe-text-button {
display: block; display: block;
} }
...@@ -20,14 +20,16 @@ ...@@ -20,14 +20,16 @@
visibility: visible; visibility: visible;
} }
.loading #retry-button { .loading oobe-text-button {
pointer-events: none; pointer-events: none;
} }
#loading-message { #loading-message {
color: rgba(0, 0, 0, .54); padding-top: 240px;
font-size: 13px; }
padding: 210px 0 0 0;
#retry-button {
margin-inline-end: 0;
} }
paper-progress { paper-progress {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</div> </div>
<div class="container" id="loading-container"> <div class="container" id="loading-container">
<div id="loading-message"> <div id="loading-message" class="content">
<div i18n-content="assistantOptinLoading"></div> <div i18n-content="assistantOptinLoading"></div>
</div> </div>
<paper-progress class="slow" indeterminate></paper-progress> <paper-progress class="slow" indeterminate></paper-progress>
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
</div> </div>
<div slot="bottom-buttons" class="flex layout horizontal"> <div slot="bottom-buttons" class="flex layout horizontal">
<div class="flex"></div> <div class="flex"></div>
<oobe-text-button id="skip-button" on-tap="onSkipTap_"
disabled="[[buttonsDisabled]]">
<div i18n-content="assistantOptinSkipButton"></div>
</oobe-text-button>
<oobe-text-button id="retry-button" inverse android <oobe-text-button id="retry-button" inverse android
on-tap="onRetryTap_" disabled="[[buttonsDisabled]]"> on-tap="onRetryTap_" disabled="[[buttonsDisabled]]">
<div i18n-content="assistantOptinRetryButton"></div> <div i18n-content="assistantOptinRetryButton"></div>
......
...@@ -54,6 +54,15 @@ Polymer({ ...@@ -54,6 +54,15 @@ Polymer({
this.fire('reload'); this.fire('reload');
}, },
/**
* On-tap event handler for skip button.
*
* @private
*/
onSkipTap_: function() {
chrome.send('dialogClose');
},
/** /**
* Add class to the list of classes of root elements. * Add class to the list of classes of root elements.
* @param {string} className class to add * @param {string} className class to add
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<include src="../login/hd-iron-icon.html">
<include src="../login/oobe_buttons.html"> <include src="../login/oobe_buttons.html">
<include src="../login/oobe_change_picture.html"> <include src="../login/oobe_change_picture.html">
<include src="../login/oobe_dialog.html"> <include src="../login/oobe_dialog.html">
<include src="assistant_confirm_reject.html">
<include src="assistant_get_more.html"> <include src="assistant_get_more.html">
<include src="assistant_loading.html"> <include src="assistant_loading.html">
<include src="assistant_ready.html"> <include src="assistant_ready.html">
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// <include src="../login/hd-iron-icon.js">
// <include src="../login/oobe_types.js"> // <include src="../login/oobe_types.js">
// <include src="../login/oobe_buttons.js"> // <include src="../login/oobe_buttons.js">
// <include src="../login/oobe_change_picture.js"> // <include src="../login/oobe_change_picture.js">
...@@ -9,7 +10,6 @@ ...@@ -9,7 +10,6 @@
// <include src="../login/oobe_dialog.js"> // <include src="../login/oobe_dialog.js">
// <include src="utils.js"> // <include src="utils.js">
// <include src="setting_zippy.js"> // <include src="setting_zippy.js">
// <include src="assistant_confirm_reject.js">
// <include src="assistant_get_more.js"> // <include src="assistant_get_more.js">
// <include src="assistant_loading.js"> // <include src="assistant_loading.js">
// <include src="assistant_ready.js"> // <include src="assistant_ready.js">
...@@ -43,7 +43,6 @@ cr.define('assistantOptin', function() { ...@@ -43,7 +43,6 @@ cr.define('assistantOptin', function() {
loadTimeData.overrideValues(data); loadTimeData.overrideValues(data);
i18nTemplate.process(document, loadTimeData); i18nTemplate.process(document, loadTimeData);
$('value-prop').reloadContent(data); $('value-prop').reloadContent(data);
$('confirm-reject').reloadContent(data);
$('third-party').reloadContent(data); $('third-party').reloadContent(data);
$('get-more').reloadContent(data); $('get-more').reloadContent(data);
}, },
...@@ -75,13 +74,6 @@ cr.define('assistantOptin', function() { ...@@ -75,13 +74,6 @@ cr.define('assistantOptin', function() {
showNextScreen: function() { showNextScreen: function() {
switch (this.currentScreen) { switch (this.currentScreen) {
case $('value-prop'): case $('value-prop'):
if ($('value-prop').userAccepted) {
this.showScreen($('third-party'));
} else {
this.showScreen($('confirm-reject'));
}
break;
case $('confirm-reject'):
this.showScreen($('third-party')); this.showScreen($('third-party'));
break; break;
case $('third-party'): case $('third-party'):
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
#ready-img { #ready-img {
display: block; display: block;
height: 180px; height: 186px;
margin: auto; margin: auto;
padding: 72px 0 0 32px; padding: 110px 0 0 72px;
}
#button-text {
padding: 0 10px 0 10px;
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="container"> <div class="container">
<img id="logo" src="assistant_logo.png"> <img id="logo" src="assistant_logo.png">
<div class="title" i18n-content="assistantReadyTitle"></div> <div class="title" i18n-content="assistantReadyTitle"></div>
<div class="sub-title" i18n-content="assistantReadyMessage"></div> <div class="content" i18n-content="assistantReadyMessage"></div>
<img id="ready-img" src="assistant_ready.svg"> <img id="ready-img" src="assistant_ready.svg">
</div> </div>
</div> </div>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="flex"></div> <div class="flex"></div>
<oobe-text-button id="next-button" inverse on-tap="onNextTap_" <oobe-text-button id="next-button" inverse on-tap="onNextTap_"
disabled="[[buttonsDisabled]]" hidden="[[moreContents]]"> disabled="[[buttonsDisabled]]" hidden="[[moreContents]]">
<div i18n-content="assistantReadyButton"></div> <div id="button-text" i18n-content="assistantReadyButton"></div>
</oobe-text-button> </oobe-text-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in the LICENSE file. */ * found in the LICENSE file. */
a { a {
color: var(--google-blue-500); color: var(--google-blue-600);
font-weight: 400; font-weight: 400;
text-decoration: none; text-decoration: none;
} }
...@@ -17,25 +17,27 @@ a { ...@@ -17,25 +17,27 @@ a {
} }
.line { .line {
background-color: rgba(0, 0, 0, .14); background-color: rgb(218, 220, 224);
height: 1px; height: 1px;
margin: 8px 0 8px 0; margin: 8px 0 8px 0;
} }
.title { .title {
font: 28px 'Google Sans', sans-serif; color: var(--google-grey-900);
font-weight: 500; font-family: 'Google Sans', Roboto, sans-serif;
font-size: 28px;
padding: 32px 0 16px 0; padding: 32px 0 16px 0;
} }
.sub-title { .sub-title {
color: var(--google-grey-900);
font: 13px Roboto, sans-serif; font: 13px Roboto, sans-serif;
font-weight: 400;
} }
.content { .content {
color: rgba(0, 0, 0, .54); color: var(--google-grey-700);
font-size: 13px; font: 13px Roboto, sans-serif;
line-height: 16px;
} }
#logo { #logo {
...@@ -44,5 +46,5 @@ a { ...@@ -44,5 +46,5 @@ a {
} }
#next-button { #next-button {
margin-inline-end: 18px; margin-inline-end: 0;
} }
...@@ -3,11 +3,10 @@ ...@@ -3,11 +3,10 @@
* found in the LICENSE file. */ * found in the LICENSE file. */
.title { .title {
font-size: 27px; font-size: 26px;
padding-bottom: 48px; padding-bottom: 48px;
} }
#footer-text { #footer-text {
font-size: 13px; padding-top: 24px;
padding-top: 16px;
} }
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
<div class="title" id="title-text"></div> <div class="title" id="title-text"></div>
<div class="line"></div> <div class="line"></div>
<div id="insertion-point"></div> <div id="insertion-point"></div>
<div id="footer-text"></div> <div class="sub-title" id="footer-text"></div>
</div> </div>
</div> </div>
<div slot="bottom-buttons" class="flex layout horizontal"> <div slot="bottom-buttons" class="flex layout horizontal">
<div class="flex"></div> <div class="flex"></div>
<oobe-text-button id="next-button" inverse on-tap="onNextTap_" <oobe-next-button id="next-button" inverse on-tap="onNextTap_"
disabled="[[buttonsDisabled]]" hidden="[[moreContents]]"> disabled="[[buttonsDisabled]]" hidden="[[moreContents]]">
<div id="next-button-text"></div> <div id="next-button-text"></div>
</oobe-text-button> </oobe-next-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
</template> </template>
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
margin: auto; margin: auto;
} }
.sub-title { #intro-text {
padding-bottom: 16px; padding: 0 8px 16px 0;
} }
#value-prop-container { #value-prop-container {
...@@ -17,37 +17,47 @@ ...@@ -17,37 +17,47 @@
} }
#consents-container { #consents-container {
border-left: 1px solid rgba(0, 0, 0, .14); border-left: 1px solid rgb(218, 220, 224);
padding-left: 24px; padding-left: 24px;
width: 50%; width: 50%;
} }
#user-name { #user-name {
color: #757575;
padding-left: 8px; padding-left: 8px;
} }
#footer-text { #footer-text {
color: #757575;
padding-top: 16px; padding-top: 16px;
} }
#user-image { #user-image {
border-radius: 50%; border-radius: 50%;
height: 24px; height: 20px;
} }
.oobe-popup { .oobe-popup {
border-radius: 8px; border-radius: 8px;
box-shadow: unset; box-shadow: unset;
width: 512px;
} }
#overlay-text { #overlay-text {
box-sizing: border-box; box-sizing: border-box;
font-size: 13px;
margin: auto; margin: auto;
min-height: 200px; min-height: 200px;
padding: 24px 24px 16px 24px; padding: 16px;
width: 100%; width: 100%;
} }
#overlay-additional-info-text {
color: rgb(128, 134, 139);
line-height: 20px;
padding-top: 20px;
}
#overlay-close-top { #overlay-close-top {
background-image: url(chrome://theme/IDR_CLOSE_DIALOG); background-image: url(chrome://theme/IDR_CLOSE_DIALOG);
background-position: center; background-position: center;
...@@ -68,8 +78,16 @@ ...@@ -68,8 +78,16 @@
background-image: url(chrome://theme/IDR_CLOSE_DIALOG_P); background-image: url(chrome://theme/IDR_CLOSE_DIALOG_P);
} }
#overlay-close-bottom {
margin-right: 0;
}
#close-button-text {
padding: 0 16px 0 16px;
}
.button-strip { .button-strip {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin: 8px; margin: 16px;
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="container"> <div class="container">
<img id="logo" src="assistant_logo.png"> <img id="logo" src="assistant_logo.png">
<div class="title" id="title-text"></div> <div class="title" id="title-text"></div>
<div class="sub-title" id="intro-text"></div> <div class="content" id="intro-text"></div>
<div class="flex layout horizontal"> <div class="flex layout horizontal">
<div id="value-prop-container"> <div id="value-prop-container">
<div class="flex layout horizontal center"> <div class="flex layout horizontal center">
...@@ -50,12 +50,13 @@ ...@@ -50,12 +50,13 @@
<div id="overlay-close-top"> <div id="overlay-close-top">
</div> </div>
<div id="overlay-text"> <div id="overlay-text">
<b id="overlay-title-text"></b><p></p> <div id="overlay-title-text"></div>
<div id="overlay-additional-info-text"></div> <div id="overlay-additional-info-text"></div>
</div> </div>
<div class="button-strip"> <div class="button-strip">
<oobe-text-button inverse id="overlay-close-bottom"> <oobe-text-button inverse id="overlay-close-bottom">
<div i18n-content="assistantOptinOKButton"></div> <div i18n-content="assistantOptinOKButton" id="close-button-text">
</div>
</oobe-text-button> </oobe-text-button>
</div> </div>
</div> </div>
......
...@@ -40,14 +40,6 @@ Polymer({ ...@@ -40,14 +40,6 @@ Polymer({
value: value:
'https://www.gstatic.com/opa-android/oobe/a02187e41eed9e42/v1_omni_en_us.html', 'https://www.gstatic.com/opa-android/oobe/a02187e41eed9e42/v1_omni_en_us.html',
}, },
/**
* Whether user accept the activity control.
*/
userAccepted: {
type: Boolean,
value: true,
},
}, },
/** /**
...@@ -119,7 +111,6 @@ Polymer({ ...@@ -119,7 +111,6 @@ Polymer({
* @private * @private
*/ */
onSkipTap_: function() { onSkipTap_: function() {
this.userAccepted = false;
chrome.send('AssistantValuePropScreen.userActed', ['skip-pressed']); chrome.send('AssistantValuePropScreen.userActed', ['skip-pressed']);
}, },
...@@ -129,7 +120,6 @@ Polymer({ ...@@ -129,7 +120,6 @@ Polymer({
* @private * @private
*/ */
onNextTap_: function() { onNextTap_: function() {
this.userAccepted = true;
chrome.send('AssistantValuePropScreen.userActed', ['next-pressed']); chrome.send('AssistantValuePropScreen.userActed', ['next-pressed']);
}, },
......
...@@ -2,36 +2,41 @@ ...@@ -2,36 +2,41 @@
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */ * found in the LICENSE file. */
#setting_zippy { #container[popupStyle] {
padding-bottom: 14px; padding-top: 8px;
} }
.content { #container:not([popupStyle]) {
padding: 6px 0 6px 0; align-items: center;
height: 48px;
} }
.content[toggleStyle] { .content {
padding-bottom: 0; padding-top: 4px;
} }
.content[popupStyle] { .content[popupStyle] {
padding-bottom: 24px; padding: 4px 0 16px 0;
} }
.icon { .icon {
min-width: 38px; min-width: 36px;
} }
.icon-view { .icon-view {
display: block; display: block;
height: 24px; height: 20px;
width: 24px; width: 20px;
}
cr-expand-button {
padding-right: 8px;
} }
.toggle { .toggle {
padding-top: 9px; padding-right: 20px;
} }
.indent { .indent {
padding: 6px 0 0 38px; padding-left: 36px;
} }
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<link rel="stylesheet" href="../login/oobe_flex_layout.css"> <link rel="stylesheet" href="../login/oobe_flex_layout.css">
<link rel="stylesheet" href="setting_zippy.css"> <link rel="stylesheet" href="setting_zippy.css">
<link rel="stylesheet" href="assistant_shared_styles.css"> <link rel="stylesheet" href="assistant_shared_styles.css">
<div class="flex layout horizontal"> <div class="flex layout horizontal" id="container"
popupStyle$="[[popupStyle]]">
<div class="icon"> <div class="icon">
<webview class="icon-view" src="[[iconSrc]]"></webview> <webview class="icon-view" src="[[iconSrc]]"></webview>
</div> </div>
......
...@@ -48,8 +48,8 @@ Polymer({ ...@@ -48,8 +48,8 @@ Polymer({
margin: 0; margin: 0;
} }
#icon { #icon {
width: 24px; width: 20px;
height: 24px; height: 20px;
} }
</style> </style>
<body><img id='icon' src="` + <body><img id='icon' src="` +
......
...@@ -1920,8 +1920,6 @@ jumbo_split_static_library("ui") { ...@@ -1920,8 +1920,6 @@ jumbo_split_static_library("ui") {
"webui/chromeos/assistant_optin/assistant_optin_screen_exit_code.h", "webui/chromeos/assistant_optin/assistant_optin_screen_exit_code.h",
"webui/chromeos/assistant_optin/assistant_optin_ui.cc", "webui/chromeos/assistant_optin/assistant_optin_ui.cc",
"webui/chromeos/assistant_optin/assistant_optin_ui.h", "webui/chromeos/assistant_optin/assistant_optin_ui.h",
"webui/chromeos/assistant_optin/confirm_reject_screen_handler.cc",
"webui/chromeos/assistant_optin/confirm_reject_screen_handler.h",
"webui/chromeos/assistant_optin/get_more_screen_handler.cc", "webui/chromeos/assistant_optin/get_more_screen_handler.cc",
"webui/chromeos/assistant_optin/get_more_screen_handler.h", "webui/chromeos/assistant_optin/get_more_screen_handler.h",
"webui/chromeos/assistant_optin/ready_screen_handler.cc", "webui/chromeos/assistant_optin/ready_screen_handler.cc",
......
...@@ -158,7 +158,6 @@ base::Value CreateGetMoreData(bool email_optin_needed, ...@@ -158,7 +158,6 @@ base::Value CreateGetMoreData(bool email_optin_needed,
base::Value GetSettingsUiStrings(const assistant::SettingsUi& settings_ui, base::Value GetSettingsUiStrings(const assistant::SettingsUi& settings_ui,
bool activity_control_needed) { bool activity_control_needed) {
auto consent_ui = settings_ui.consent_flow_ui().consent_ui(); auto consent_ui = settings_ui.consent_flow_ui().consent_ui();
auto confirm_reject_ui = consent_ui.activity_control_confirm_reject_ui();
auto activity_control_ui = consent_ui.activity_control_ui(); auto activity_control_ui = consent_ui.activity_control_ui();
auto third_party_disclosure_ui = consent_ui.third_party_disclosure_ui(); auto third_party_disclosure_ui = consent_ui.third_party_disclosure_ui();
base::Value dictionary(base::Value::Type::DICTIONARY); base::Value dictionary(base::Value::Type::DICTIONARY);
...@@ -191,30 +190,6 @@ base::Value GetSettingsUiStrings(const assistant::SettingsUi& settings_ui, ...@@ -191,30 +190,6 @@ base::Value GetSettingsUiStrings(const assistant::SettingsUi& settings_ui,
base::Value(consent_ui.reject_button_text())); base::Value(consent_ui.reject_button_text()));
} }
// Add confirm reject screen string constants.
// TODO(updowndota) Use remote strings after server bug fixed.
dictionary.SetKey("confirmRejectTitle",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_TITLE)));
dictionary.SetKey("confirmRejectAcceptTitle",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_TITLE)));
dictionary.SetKey("confirmRejectAcceptMessage",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_MESSAGE)));
dictionary.SetKey("confirmRejectAcceptMessageExpanded",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_ACCEPT_MESSAGE_EXPANDED)));
dictionary.SetKey("confirmRejectRejectTitle",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_REJECT_TITLE)));
dictionary.SetKey("confirmRejectRejectMessage",
base::Value(l10n_util::GetStringUTF16(
IDS_ASSISTANT_CONFIRM_SCREEN_REJECT_MESSAGE)));
dictionary.SetKey(
"confirmRejectContinueButton",
base::Value(l10n_util::GetStringUTF16(IDS_ASSISTANT_CONTINUE_BUTTON)));
// Add third party string constants. // Add third party string constants.
dictionary.SetKey("thirdPartyTitle", dictionary.SetKey("thirdPartyTitle",
base::Value(l10n_util::GetStringUTF16( base::Value(l10n_util::GetStringUTF16(
...@@ -342,7 +317,6 @@ void AssistantOptInHandler::OnGetSettingsResponse(const std::string& settings) { ...@@ -342,7 +317,6 @@ void AssistantOptInHandler::OnGetSettingsResponse(const std::string& settings) {
DCHECK(settings_ui.has_consent_flow_ui()); DCHECK(settings_ui.has_consent_flow_ui());
auto consent_ui = settings_ui.consent_flow_ui().consent_ui(); auto consent_ui = settings_ui.consent_flow_ui().consent_ui();
auto activity_control_ui = consent_ui.activity_control_ui(); auto activity_control_ui = consent_ui.activity_control_ui();
auto confirm_reject_ui = consent_ui.activity_control_confirm_reject_ui();
auto third_party_disclosure_ui = consent_ui.third_party_disclosure_ui(); auto third_party_disclosure_ui = consent_ui.third_party_disclosure_ui();
consent_token_ = activity_control_ui.consent_token(); consent_token_ = activity_control_ui.consent_token();
......
...@@ -17,8 +17,6 @@ enum class AssistantOptInScreenExitCode { ...@@ -17,8 +17,6 @@ enum class AssistantOptInScreenExitCode {
THIRD_PARTY_CONTINUED = 2, THIRD_PARTY_CONTINUED = 2,
EMAIL_OPTED_IN = 3, EMAIL_OPTED_IN = 3,
EMAIL_OPTED_OUT = 4, EMAIL_OPTED_OUT = 4,
CONFIRM_ACCEPTED = 5,
CONFIRM_REJECTED = 6,
EXIT_CODES_COUNT EXIT_CODES_COUNT
}; };
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/webui/chromeos/assistant_optin/confirm_reject_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/assistant_optin/get_more_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/assistant_optin/get_more_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/assistant_optin/ready_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/assistant_optin/ready_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/assistant_optin/third_party_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/assistant_optin/third_party_screen_handler.h"
...@@ -50,8 +49,6 @@ AssistantOptInUI::AssistantOptInUI(content::WebUI* web_ui) ...@@ -50,8 +49,6 @@ AssistantOptInUI::AssistantOptInUI(content::WebUI* web_ui)
AddScreenHandler(std::make_unique<ValuePropScreenHandler>( AddScreenHandler(std::make_unique<ValuePropScreenHandler>(
base::BindOnce(&AssistantOptInUI::OnExit, weak_factory_.GetWeakPtr()))); base::BindOnce(&AssistantOptInUI::OnExit, weak_factory_.GetWeakPtr())));
AddScreenHandler(std::make_unique<ConfirmRejectScreenHandler>(
base::BindOnce(&AssistantOptInUI::OnExit, weak_factory_.GetWeakPtr())));
AddScreenHandler(std::make_unique<ThirdPartyScreenHandler>( AddScreenHandler(std::make_unique<ThirdPartyScreenHandler>(
base::BindOnce(&AssistantOptInUI::OnExit, weak_factory_.GetWeakPtr()))); base::BindOnce(&AssistantOptInUI::OnExit, weak_factory_.GetWeakPtr())));
AddScreenHandler(std::make_unique<GetMoreScreenHandler>( AddScreenHandler(std::make_unique<GetMoreScreenHandler>(
...@@ -85,17 +82,11 @@ void AssistantOptInUI::AddScreenHandler( ...@@ -85,17 +82,11 @@ void AssistantOptInUI::AddScreenHandler(
void AssistantOptInUI::OnExit(AssistantOptInScreenExitCode exit_code) { void AssistantOptInUI::OnExit(AssistantOptInScreenExitCode exit_code) {
switch (exit_code) { switch (exit_code) {
case AssistantOptInScreenExitCode::VALUE_PROP_SKIPPED: case AssistantOptInScreenExitCode::VALUE_PROP_SKIPPED:
assistant_handler_->ShowNextScreen(); assistant_handler_->OnActivityControlOptInResult(false);
break; break;
case AssistantOptInScreenExitCode::VALUE_PROP_ACCEPTED: case AssistantOptInScreenExitCode::VALUE_PROP_ACCEPTED:
assistant_handler_->OnActivityControlOptInResult(true); assistant_handler_->OnActivityControlOptInResult(true);
break; break;
case AssistantOptInScreenExitCode::CONFIRM_ACCEPTED:
assistant_handler_->OnActivityControlOptInResult(true);
break;
case AssistantOptInScreenExitCode::CONFIRM_REJECTED:
assistant_handler_->OnActivityControlOptInResult(false);
break;
case AssistantOptInScreenExitCode::THIRD_PARTY_CONTINUED: case AssistantOptInScreenExitCode::THIRD_PARTY_CONTINUED:
assistant_handler_->ShowNextScreen(); assistant_handler_->ShowNextScreen();
break; break;
......
// Copyright 2018 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.
#include "chrome/browser/ui/webui/chromeos/assistant_optin/confirm_reject_screen_handler.h"
#include "chrome/browser/browser_process.h"
#include "chrome/grit/generated_resources.h"
#include "components/login/localized_values_builder.h"
namespace {
constexpr char kJsScreenPath[] = "AssistantConfirmRejectScreen";
} // namespace
namespace chromeos {
ConfirmRejectScreenHandler::ConfirmRejectScreenHandler(
OnAssistantOptInScreenExitCallback callback)
: BaseWebUIHandler(), exit_callback_(std::move(callback)) {
set_call_js_prefix(kJsScreenPath);
}
ConfirmRejectScreenHandler::~ConfirmRejectScreenHandler() = default;
void ConfirmRejectScreenHandler::DeclareLocalizedValues(
::login::LocalizedValuesBuilder* builder) {}
void ConfirmRejectScreenHandler::RegisterMessages() {
AddPrefixedCallback("userActed",
&ConfirmRejectScreenHandler::HandleUserAction);
}
void ConfirmRejectScreenHandler::Initialize() {}
void ConfirmRejectScreenHandler::HandleUserAction(bool confirm_result) {
DCHECK(exit_callback_);
if (confirm_result) {
std::move(exit_callback_)
.Run(AssistantOptInScreenExitCode::CONFIRM_ACCEPTED);
} else {
std::move(exit_callback_)
.Run(AssistantOptInScreenExitCode::CONFIRM_REJECTED);
}
}
} // namespace chromeos
// Copyright 2018 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.
#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_ASSISTANT_OPTIN_CONFIRM_REJECT_SCREEN_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_ASSISTANT_OPTIN_CONFIRM_REJECT_SCREEN_HANDLER_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "chrome/browser/ui/webui/chromeos/assistant_optin/assistant_optin_screen_exit_code.h"
#include "chrome/browser/ui/webui/chromeos/login/base_webui_handler.h"
namespace chromeos {
class ConfirmRejectScreenHandler : public BaseWebUIHandler {
public:
explicit ConfirmRejectScreenHandler(
OnAssistantOptInScreenExitCallback callback);
~ConfirmRejectScreenHandler() override;
// BaseWebUIHandler:
void DeclareLocalizedValues(
::login::LocalizedValuesBuilder* builder) override;
void RegisterMessages() override;
void Initialize() override;
private:
void HandleUserAction(bool confirm_result);
OnAssistantOptInScreenExitCallback exit_callback_;
DISALLOW_COPY_AND_ASSIGN(ConfirmRejectScreenHandler);
};
} // namespace chromeos
#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_ASSISTANT_OPTIN_CONFIRM_REJECT_SCREEN_HANDLER_H_
...@@ -38,6 +38,8 @@ void ValuePropScreenHandler::DeclareLocalizedValues( ...@@ -38,6 +38,8 @@ void ValuePropScreenHandler::DeclareLocalizedValues(
IDS_VOICE_INTERACTION_VALUE_PROP_LOAD_ERROR_TITLE); IDS_VOICE_INTERACTION_VALUE_PROP_LOAD_ERROR_TITLE);
builder->Add("assistantOptinLoadErrorMessage", builder->Add("assistantOptinLoadErrorMessage",
IDS_VOICE_INTERACTION_VALUE_PROP_LOAD_ERROR_MESSAGE); IDS_VOICE_INTERACTION_VALUE_PROP_LOAD_ERROR_MESSAGE);
builder->Add("assistantOptinSkipButton",
IDS_VOICE_INTERACTION_VALUE_PROP_SKIP_BUTTON);
builder->Add("assistantOptinRetryButton", builder->Add("assistantOptinRetryButton",
IDS_VOICE_INTERACTION_VALUE_PROP_RETRY_BUTTON); IDS_VOICE_INTERACTION_VALUE_PROP_RETRY_BUTTON);
builder->Add("assistantOptinOKButton", IDS_OOBE_OK_BUTTON_TEXT); builder->Add("assistantOptinOKButton", IDS_OOBE_OK_BUTTON_TEXT);
......
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