Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Issue 2931063004: Extract colors from wallpaper and dynamically update login screen overlay (Closed)

Created:
3 years, 6 months ago by Wenzhao (Colin) Zang
Modified:
3 years, 6 months ago
Reviewers:
xiyuan, jdufault, xdai1
CC:
chromium-reviews, alemate+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, rkc, Alexander Alekseev
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract colors from wallpaper and dynamically update login screen overlay In SigninScreenHandler there's already a 'loadWallpaper' handler. We can add additional color extraction calculation after the wallpaper is fetched and is being loaded. Plaese note: 1) SigninScreenHandler is an observer for WallpaperManager, and WallpaperManager is an observer for WallpaperColorCalculator. 2) The calculation is specific to the login screen. The interface is not made more general because it's unlikely the color needed by the login screen will change, nor the function needs to be reused. 3) Codes for caching color extraction results can be added if necessary. There's no performance issue for an eve device. BUG=718156 Review-Url: https://codereview.chromium.org/2931063004 Cr-Commit-Position: refs/heads/master@{#480616} Committed: https://chromium.googlesource.com/chromium/src/+/11d5ed105384e572c6a2617126426980874a15a4

Patch Set 1 #

Patch Set 2 : Add image-loading class to small pods container #

Total comments: 18

Patch Set 3 : Address comments #

Total comments: 32

Patch Set 4 : Address comments #

Patch Set 5 : Move unrelated style changes to a separate CL #

Total comments: 17

Patch Set 6 : Address comments #

Total comments: 2

Patch Set 7 : Address comments and rebase with master #

Total comments: 4

Patch Set 8 : Add RemoveObserver() and TODO #

Patch Set 9 : Rebase with master, no other changes #

Patch Set 10 : Check nullptr before removing observer #

Patch Set 11 : Delete RemoveObserver #

Patch Set 12 : Add nullptr checking #

Patch Set 13 : Replace background with backgroundColor in JS #

Patch Set 14 : Test with AddObserver #

Patch Set 15 : Observe WallpaperController instead of WallpaperManager #

Patch Set 16 : Change back to WallpaperManagerBase::Observer #

Patch Set 17 : Will clean up this CL when crbug.com/733709 is fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -28 lines) Patch
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +29 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h View 1 2 3 4 5 6 7 8 15 4 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +38 lines, -1 line 0 comments Download
M components/wallpaper/wallpaper_manager_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -1 line 0 comments Download
M ui/login/account_picker/md_screen_account_picker.css View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -5 lines 0 comments Download
M ui/login/account_picker/md_screen_account_picker.html View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ui/login/account_picker/md_screen_account_picker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +12 lines, -0 lines 0 comments Download
M ui/login/account_picker/md_user_pod_row.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +77 lines, -13 lines 0 comments Download
M ui/login/md_screen_container.css View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 89 (67 generated)
Wenzhao (Colin) Zang
3 years, 6 months ago (2017-06-10 02:30:41 UTC) #6
jdufault
https://codereview.chromium.org/2931063004/diff/20001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/20001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode1502 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:1502: *dm_color = color_utils::SkColorToRgbaString(dm_sk_color); Output the SkColor values and have ...
3 years, 6 months ago (2017-06-10 03:05:59 UTC) #7
Wenzhao (Colin) Zang
https://codereview.chromium.org/2931063004/diff/20001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/20001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode1502 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:1502: *dm_color = color_utils::SkColorToRgbaString(dm_sk_color); On 2017/06/10 03:05:59, jdufault wrote: > ...
3 years, 6 months ago (2017-06-12 21:10:58 UTC) #9
jdufault
https://codereview.chromium.org/2931063004/diff/40001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/40001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode433 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:433: color_calculator_->RemoveObserver(this); Add a comment along the lines of // ...
3 years, 6 months ago (2017-06-12 21:37:29 UTC) #10
Wenzhao (Colin) Zang
https://codereview.chromium.org/2931063004/diff/40001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/40001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode433 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:433: color_calculator_->RemoveObserver(this); On 2017/06/12 21:37:28, jdufault wrote: > Add a ...
3 years, 6 months ago (2017-06-12 23:40:35 UTC) #11
Wenzhao (Colin) Zang
xdai@, please look at wallpaper_manager_base.h and wallpaper_manager.cc. Thanks so much. xiyuan@, please take a look ...
3 years, 6 months ago (2017-06-13 22:20:54 UTC) #13
xdai1
See the inline comments. https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode439 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:439: image, color_utils::LumaRange::DARK, color_utils::SaturationRange::MUTED, Is the ...
3 years, 6 months ago (2017-06-13 23:04:24 UTC) #14
xiyuan
https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode935 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:935: return; |color_calculator_|.reset() is skipped when this happens. https://codereview.chromium.org/2931063004/diff/80001/components/wallpaper/wallpaper_manager_base.h File ...
3 years, 6 months ago (2017-06-13 23:23:48 UTC) #15
Wenzhao (Colin) Zang
Thanks for the comments. https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode439 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:439: image, color_utils::LumaRange::DARK, color_utils::SaturationRange::MUTED, On 2017/06/13 ...
3 years, 6 months ago (2017-06-14 00:44:50 UTC) #16
xdai1
https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode439 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:439: image, color_utils::LumaRange::DARK, color_utils::SaturationRange::MUTED, On 2017/06/14 00:44:50, Wenzhao (Colin) Zang ...
3 years, 6 months ago (2017-06-14 18:23:40 UTC) #17
xiyuan
https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode439 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:439: image, color_utils::LumaRange::DARK, color_utils::SaturationRange::MUTED, On 2017/06/14 18:23:40, xdai1 wrote: > ...
3 years, 6 months ago (2017-06-14 18:28:26 UTC) #18
Wenzhao (Colin) Zang
https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode439 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:439: image, color_utils::LumaRange::DARK, color_utils::SaturationRange::MUTED, On 2017/06/14 18:28:26, xiyuan wrote: > ...
3 years, 6 months ago (2017-06-15 05:02:08 UTC) #19
xdai1
On 2017/06/15 05:02:08, Wenzhao (Colin) Zang wrote: > https://codereview.chromium.org/2931063004/diff/80001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc > File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): > > ...
3 years, 6 months ago (2017-06-15 16:48:36 UTC) #20
Wenzhao (Colin) Zang
The comments are addressed, and the bug is filed and a separate CL on the ...
3 years, 6 months ago (2017-06-15 18:14:40 UTC) #21
xdai1
wallpaper_manager_base.h and wallpaper_manager.cc &.h lgtm https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode445 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:445: color_calculator_.reset(); Remove WallpaperManager as ...
3 years, 6 months ago (2017-06-15 18:27:51 UTC) #22
xiyuan
lgtm
3 years, 6 months ago (2017-06-15 18:29:52 UTC) #23
xdai1
https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h (right): https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h#newcode258 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h:258: std::unique_ptr<wallpaper::WallpaperColorCalculator> color_calculator_; Sorry. one more comment: Could you also ...
3 years, 6 months ago (2017-06-15 18:36:55 UTC) #24
Wenzhao (Colin) Zang
https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc File chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc (right): https://codereview.chromium.org/2931063004/diff/120001/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc#newcode445 chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc:445: color_calculator_.reset(); On 2017/06/15 18:27:51, xdai1 wrote: > Remove WallpaperManager ...
3 years, 6 months ago (2017-06-15 19:04:14 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2931063004/140001
3 years, 6 months ago (2017-06-15 19:16:49 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/118321)
3 years, 6 months ago (2017-06-15 19:29:44 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2931063004/320001
3 years, 6 months ago (2017-06-19 22:48:42 UTC) #86
commit-bot: I haz the power
3 years, 6 months ago (2017-06-19 22:53:45 UTC) #89
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/11d5ed105384e572c6a261712642...

Powered by Google App Engine
This is Rietveld 408576698