Commit 22d96203 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Update register and accept Cloud Print flow for GDPR

Add GDPR text to the local discovery and Print Preview flows for
registering and accepting cloud printers, respectively.

Bug: 826591
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I4ed895c9b5db992dcd64cdcfc86206860d896739
Reviewed-on: https://chromium-review.googlesource.com/1005571
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550033}
parent c37646df
...@@ -10063,9 +10063,6 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href ...@@ -10063,9 +10063,6 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href
<message name="IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE" desc="Title for devices page"> <message name="IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE" desc="Title for devices page">
Devices Devices
</message> </message>
<message name="IDS_LOCAL_DISCOVERY_REGISTER_PRINTER_CONFIRMATION" desc="Confirmation for registering a printer to Google Cloud Print">
Do you wish to register the printer <ph name="PRINTER_NAME">$1</ph> to Google Cloud Print?
</message>
<message name="IDS_LOCAL_DISCOVERY_REGISTER_DEVICE_CONFIRMATION" desc="Confirmation for registering a device to Google Cloud Devices"> <message name="IDS_LOCAL_DISCOVERY_REGISTER_DEVICE_CONFIRMATION" desc="Confirmation for registering a device to Google Cloud Devices">
Do you wish to register <ph name="DEVICE_NAME">$1</ph> to Google Cloud Devices? Do you wish to register <ph name="DEVICE_NAME">$1</ph> to Google Cloud Devices?
</message> </message>
...@@ -10166,6 +10163,11 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href ...@@ -10166,6 +10163,11 @@ For more information, visit our <ph name="BEGIN_LINK">&lt;a target="_blank" href
Printer registration has timed out. In order to register a printer, you must confirm registration on the printer. Printer registration has timed out. In order to register a printer, you must confirm registration on the printer.
</message> </message>
<!--Printer registration message for local discovery and Print Preview-->
<message name="IDS_CLOUD_PRINT_REGISTER_PRINTER_INFORMATION" desc="Information about registering printers with Google Cloud Print shown to the user before they confirm registration.">
Documents are <ph name="BEGIN_LINK_HELP">&lt;a is="action-link" href="https://support.google.com/cloudprint/answer/2541843" target="_blank"&gt;</ph>sent to Google<ph name="END_LINK_HELP">&lt;/a&gt;</ph> to prepare them for printing. View, edit and manage your printers and printer history on the <ph name="BEGIN_LINK_DASHBOARD">&lt;a is="action-link" href="https://www.google.com/cloudprint#jobs" target="_blank"&gt;</ph>Google Cloud Print dashboard<ph name="END_LINK_DASHBOARD">&lt;/a&gt;</ph>.
</message>
<!--Tab alert tooltip strings--> <!--Tab alert tooltip strings-->
<message name="IDS_TOOLTIP_TAB_ALERT_STATE_MEDIA_RECORDING" desc="Extra tool tip text, when the tab is recording media."> <message name="IDS_TOOLTIP_TAB_ALERT_STATE_MEDIA_RECORDING" desc="Extra tool tip text, when the tab is recording media.">
This tab is using your camera or microphone. This tab is using your camera or microphone.
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<h1>$i18n{confirmRegistration}</h1> <h1>$i18n{confirmRegistration}</h1>
<div class="dialog-contents"> <div class="dialog-contents">
<div id="register-message"> <div id="register-message">
$i18nRaw{registerPrinterInformationMessage}
</div> </div>
<div class="button-list"> <div class="button-list">
...@@ -38,10 +39,8 @@ ...@@ -38,10 +39,8 @@
</a> </a>
</div> </div>
<button class="register-cancel">$i18n{cancel}</button> <button class="register-cancel">$i18n{cancel}</button>
<button id="register-continue-button"> <button id="register-continue">$i18n{confirm}</button>
$i18n{serviceRegister} </div>
</button>
</div>
</div> </div>
</div> </div>
......
...@@ -118,6 +118,7 @@ cr.define('local_discovery', function() { ...@@ -118,6 +118,7 @@ cr.define('local_discovery', function() {
deviceContainer: function() { deviceContainer: function() {
return $('register-device-list'); return $('register-device-list');
}, },
/** /**
* Register the device. * Register the device.
*/ */
...@@ -133,11 +134,8 @@ cr.define('local_discovery', function() { ...@@ -133,11 +134,8 @@ cr.define('local_discovery', function() {
*/ */
showRegister: function() { showRegister: function() {
recordUmaEvent(DEVICES_PAGE_EVENTS.REGISTER_CLICKED); recordUmaEvent(DEVICES_PAGE_EVENTS.REGISTER_CLICKED);
$('register-message').textContent = loadTimeData.getStringF( $('register-continue').onclick = this.register.bind(this);
isPrinter(this.info.type) ? 'registerPrinterConfirmMessage' :
'registerDeviceConfirmMessage',
this.info.display_name);
$('register-continue-button').onclick = this.register.bind(this);
showRegisterOverlay(); showRegisterOverlay();
}, },
/** /**
...@@ -521,7 +519,7 @@ cr.define('local_discovery', function() { ...@@ -521,7 +519,7 @@ cr.define('local_discovery', function() {
isUserLoggedIn || isUserSupervisedOrOffTheRecord; isUserLoggedIn || isUserSupervisedOrOffTheRecord;
$('register-overlay-login-promo').hidden = $('register-overlay-login-promo').hidden =
isUserLoggedIn || isUserSupervisedOrOffTheRecord; isUserLoggedIn || isUserSupervisedOrOffTheRecord;
$('register-continue-button').disabled = $('register-continue').disabled =
!isUserLoggedIn || isUserSupervisedOrOffTheRecord; !isUserLoggedIn || isUserSupervisedOrOffTheRecord;
$('my-devices-container').hidden = userSupervisedOrOffTheRecord; $('my-devices-container').hidden = userSupervisedOrOffTheRecord;
......
...@@ -89,6 +89,10 @@ ...@@ -89,6 +89,10 @@
-webkit-margin-start: 10px; -webkit-margin-start: 10px;
} }
#destination-search .invitation-cloud-print-information {
padding-top: 12px;
}
#destination-search #invitation-process-throbber { #destination-search #invitation-process-throbber {
display: block; display: block;
} }
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
<button class="invitation-reject-button">$i18n{reject}</button> <button class="invitation-reject-button">$i18n{reject}</button>
<div id="invitation-process-throbber" class="throbber" hidden></div> <div id="invitation-process-throbber" class="throbber" hidden></div>
</div> </div>
<div class="invitation-cloud-print-information">
$i18nRaw{registerPrinterInformationMessage}
</div>
</div> </div>
<div class="cloudprint-promo gray-bottom-bar" hidden> <div class="cloudprint-promo gray-bottom-bar" hidden>
<img src="../images/cloud.png" class="icon" alt=""> <img src="../images/cloud.png" class="icon" alt="">
......
...@@ -791,7 +791,7 @@ cr.define('print_preview', function() { ...@@ -791,7 +791,7 @@ cr.define('print_preview', function() {
*/ */
onWindowResize_: function() { onWindowResize_: function() {
this.reflowLists_(); this.reflowLists_();
} },
}; };
// Export // Export
......
...@@ -36,10 +36,8 @@ content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { ...@@ -36,10 +36,8 @@ content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() {
IDS_LOCAL_DISCOVERY_SERVICE_REGISTER); IDS_LOCAL_DISCOVERY_SERVICE_REGISTER);
source->AddLocalizedString("manageDevice", IDS_LOCAL_DISCOVERY_MANAGE_DEVICE); source->AddLocalizedString("manageDevice", IDS_LOCAL_DISCOVERY_MANAGE_DEVICE);
source->AddLocalizedString("registerPrinterConfirmMessage", source->AddLocalizedString("registerPrinterInformationMessage",
IDS_LOCAL_DISCOVERY_REGISTER_PRINTER_CONFIRMATION); IDS_CLOUD_PRINT_REGISTER_PRINTER_INFORMATION);
source->AddLocalizedString("registerDeviceConfirmMessage",
IDS_LOCAL_DISCOVERY_REGISTER_DEVICE_CONFIRMATION);
source->AddLocalizedString("registerUser", source->AddLocalizedString("registerUser",
IDS_LOCAL_DISCOVERY_REGISTER_USER); IDS_LOCAL_DISCOVERY_REGISTER_USER);
source->AddLocalizedString("confirmRegistration", source->AddLocalizedString("confirmRegistration",
...@@ -77,6 +75,7 @@ content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { ...@@ -77,6 +75,7 @@ content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() {
source->AddLocalizedString("printersOnNetworkMultiple", source->AddLocalizedString("printersOnNetworkMultiple",
IDS_LOCAL_DISCOVERY_PRINTERS_ON_NETWORK_MULTIPLE); IDS_LOCAL_DISCOVERY_PRINTERS_ON_NETWORK_MULTIPLE);
source->AddLocalizedString("cancel", IDS_CANCEL); source->AddLocalizedString("cancel", IDS_CANCEL);
source->AddLocalizedString("confirm", IDS_CONFIRM);
source->AddLocalizedString("ok", IDS_OK); source->AddLocalizedString("ok", IDS_OK);
source->AddLocalizedString("loading", IDS_LOCAL_DISCOVERY_LOADING); source->AddLocalizedString("loading", IDS_LOCAL_DISCOVERY_LOADING);
source->AddLocalizedString("addPrinters", IDS_LOCAL_DISCOVERY_ADD_PRINTERS); source->AddLocalizedString("addPrinters", IDS_LOCAL_DISCOVERY_ADD_PRINTERS);
......
...@@ -352,6 +352,8 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { ...@@ -352,6 +352,8 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
"groupPrinterSharingInviteText", IDS_PRINT_PREVIEW_GROUP_INVITE_TEXT); "groupPrinterSharingInviteText", IDS_PRINT_PREVIEW_GROUP_INVITE_TEXT);
source->AddLocalizedString( source->AddLocalizedString(
"printerSharingInviteText", IDS_PRINT_PREVIEW_INVITE_TEXT); "printerSharingInviteText", IDS_PRINT_PREVIEW_INVITE_TEXT);
source->AddLocalizedString("registerPrinterInformationMessage",
IDS_CLOUD_PRINT_REGISTER_PRINTER_INFORMATION);
source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL); source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL);
source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL); source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL);
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
...@@ -30,7 +30,7 @@ function registerShowOverlay() { ...@@ -30,7 +30,7 @@ function registerShowOverlay() {
} }
function registerBegin() { function registerBegin() {
var button = $("register-continue-button"); var button = $('register-continue');
assertTrue(button != null); assertTrue(button != null);
assertFalse($('register-page-confirm').hidden); assertFalse($('register-page-confirm').hidden);
......
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