From cd5baaa182a8315a6f5278ebea2df3209fcda9b6 Mon Sep 17 00:00:00 2001 From: Jeremy Klein Date: Wed, 5 Sep 2018 19:21:14 +0000 Subject: [PATCH] [CrOS MultiDevice] Add profile information to password page. This CL adds the user's e-mail address and profile photo to the password prompt page at the beginning of the setup flow. This is a security requirement as it makes it clear to users what password that they should enter. Additionally, this CL adds a "cancel" button to this page. Note that there are various styling/CSS changes which still need to be made so that this page matches the mocks. TBR=khorimoto@google.com (cherry picked from commit a83fb6d38853df9924f1df1949464380db8cf51b) Bug: 878643, 824568 Change-Id: I59e75f73c310ea5f275b844268b70fa2e47af72f Reviewed-on: https://chromium-review.googlesource.com/1198564 Reviewed-by: Tommy Li Commit-Queue: Kyle Horimoto Cr-Original-Commit-Position: refs/heads/master@{#588186} Reviewed-on: https://chromium-review.googlesource.com/1208452 Reviewed-by: Jeremy Klein Cr-Commit-Position: refs/branch-heads/3538@{#64} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} --- .../multidevice_setup_browser_proxy.js | 12 +++++++ .../multidevice_setup/password_page.html | 24 ++++++++++++-- .../multidevice_setup/password_page.js | 31 +++++++++++++++++++ .../chromeos/multidevice_setup/ui_page.html | 1 - .../multidevice_setup_handler.cc | 31 +++++++++++++++++++ .../multidevice_setup_handler.h | 5 ++- 6 files changed, 98 insertions(+), 6 deletions(-) diff --git a/chrome/browser/resources/chromeos/multidevice_setup/multidevice_setup_browser_proxy.js b/chrome/browser/resources/chromeos/multidevice_setup/multidevice_setup_browser_proxy.js index f4e761d87a67f..be88d7462777e 100644 --- a/chrome/browser/resources/chromeos/multidevice_setup/multidevice_setup_browser_proxy.js +++ b/chrome/browser/resources/chromeos/multidevice_setup/multidevice_setup_browser_proxy.js @@ -5,6 +5,13 @@ cr.define('multidevice_setup', function() { /** @interface */ class BrowserProxy { + /** + * Requests profile information; namely, a dictionary containing the user's + * e-mail address and profile photo. + * @return {!Promise<{profilePhotoUrl: string, email: string}>} + */ + getProfileInfo() {} + /** * Opens settings to the MultiDevice individual feature settings subpage. * (a.k.a. Connected Devices). @@ -14,6 +21,11 @@ cr.define('multidevice_setup', function() { /** @implements {multidevice_setup.BrowserProxy} */ class BrowserProxyImpl { + /** @override */ + getProfileInfo() { + return cr.sendWithPromise('getProfileInfo'); + } + /** @override */ openMultiDeviceSettings() { chrome.send('openMultiDeviceSettings'); diff --git a/chrome/browser/resources/chromeos/multidevice_setup/password_page.html b/chrome/browser/resources/chromeos/multidevice_setup/password_page.html index be7271f89fda5..2e24d15f5d094 100644 --- a/chrome/browser/resources/chromeos/multidevice_setup/password_page.html +++ b/chrome/browser/resources/chromeos/multidevice_setup/password_page.html @@ -7,10 +7,30 @@