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

Issue 2857103007: [Night Light] CL2: Ash and system tray work (Closed)

Created:
3 years, 7 months ago by afakhry
Modified:
3 years, 7 months ago
CC:
chromium-reviews, kalyank, sadrul, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Night Light] CL2: Ash and system tray work Add ash and system tray initial plumbing. Support only toggling NightLight on / off and setting the temperature to a fixed 0.5f value when it's turned on for now. Follow-up CLs will add system settings support. Demo: https://bugs.chromium.org/p/chromium/issues/detail?id=705816#c4 BUG=705816 TEST=System tray has a toggle button. NightLight turns on / off with a 2-second animation. When on, a tray icon shows next to the clock and battery. Review-Url: https://codereview.chromium.org/2857103007 Cr-Commit-Position: refs/heads/master@{#470392} Committed: https://chromium.googlesource.com/chromium/src/+/e4fae85260876af2c08495ccf33b6c3051db1730

Patch Set 1 #

Patch Set 2 : Rebase and fix tests. #

Patch Set 3 : Added tests #

Patch Set 4 : Exclude one test from mash #

Total comments: 80

Patch Set 5 : James' comments #

Total comments: 6

Patch Set 6 : Rebase + more comments #

Patch Set 7 : Rebase + one missed comment #

Total comments: 12

Patch Set 8 : Nits #

Total comments: 2

Patch Set 9 : Rebase on Xiyuan's change, and mpearson's nit. #

Total comments: 2

Patch Set 10 : Update comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+691 lines, -9 lines) Patch
M ash/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M ash/ash_strings.grd View 1 chunk +3 lines, -1 line 0 comments Download
M ash/metrics/user_metrics_action.h View 1 chunk +1 line, -0 lines 0 comments Download
M ash/metrics/user_metrics_recorder.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M ash/resources/vector_icons/BUILD.gn View 2 chunks +6 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_menu_night_light_off.icon View 1 chunk +34 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_menu_night_light_off.1x.icon View 1 chunk +34 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_menu_night_light_on.icon View 1 chunk +21 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_menu_night_light_on.1x.icon View 1 chunk +20 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_tray_night_light.icon View 1 chunk +21 lines, -0 lines 0 comments Download
A ash/resources/vector_icons/system_tray_night_light.1x.icon View 1 chunk +21 lines, -0 lines 0 comments Download
M ash/shell.h View 1 2 3 4 5 6 7 8 9 5 chunks +9 lines, -0 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -0 lines 0 comments Download
A ash/system/night_light/night_light_controller.h View 1 2 3 4 5 6 7 8 1 chunk +79 lines, -0 lines 0 comments Download
A ash/system/night_light/night_light_controller.cc View 1 2 3 4 5 6 7 8 9 1 chunk +142 lines, -0 lines 0 comments Download
A ash/system/night_light/night_light_controller_unittest.cc View 1 2 3 4 5 6 7 1 chunk +137 lines, -0 lines 0 comments Download
A ash/system/night_light/tray_night_light.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A ash/system/night_light/tray_night_light.cc View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A ash/system/night_light/tray_night_light_unittest.cc View 1 2 3 4 5 6 7 1 chunk +33 lines, -0 lines 0 comments Download
M ash/system/tiles/tiles_default_view.h View 1 chunk +1 line, -0 lines 0 comments Download
M ash/system/tiles/tiles_default_view.cc View 1 2 3 4 5 6 5 chunks +20 lines, -7 lines 0 comments Download
M ash/system/tiles/tray_tiles_unittest.cc View 1 2 3 4 6 chunks +9 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray.h View 1 2 3 4 3 chunks +4 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray_item.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (41 generated)
afakhry
James, could you please take a look? Thank you!
3 years, 7 months ago (2017-05-04 02:13:20 UTC) #4
James Cook
I pinged the bug for more input on what the final UX is supposed to ...
3 years, 7 months ago (2017-05-04 14:29:30 UTC) #7
afakhry
On 2017/05/04 14:29:30, James Cook wrote: > I pinged the bug for more input on ...
3 years, 7 months ago (2017-05-05 01:51:24 UTC) #14
James Cook
https://codereview.chromium.org/2857103007/diff/60001/ash/ash_strings.grd File ash/ash_strings.grd (right): https://codereview.chromium.org/2857103007/diff/60001/ash/ash_strings.grd#newcode217 ash/ash_strings.grd:217: Toggle Night Light nit: "Toggle night light" (sentence case) ...
3 years, 7 months ago (2017-05-05 17:12:33 UTC) #21
afakhry
Thanks for the detailed review! https://codereview.chromium.org/2857103007/diff/60001/ash/ash_strings.grd File ash/ash_strings.grd (right): https://codereview.chromium.org/2857103007/diff/60001/ash/ash_strings.grd#newcode217 ash/ash_strings.grd:217: Toggle Night Light On ...
3 years, 7 months ago (2017-05-05 20:04:12 UTC) #23
James Cook
https://codereview.chromium.org/2857103007/diff/60001/ash/system/night_light/night_light_controller.cc File ash/system/night_light/night_light_controller.cc (right): https://codereview.chromium.org/2857103007/diff/60001/ash/system/night_light/night_light_controller.cc#newcode119 ash/system/night_light/night_light_controller.cc:119: LOG(ERROR) << "Can't initialize NightLight user settings. No " ...
3 years, 7 months ago (2017-05-05 20:47:43 UTC) #27
afakhry
https://codereview.chromium.org/2857103007/diff/60001/ash/system/night_light/night_light_controller.cc File ash/system/night_light/night_light_controller.cc (right): https://codereview.chromium.org/2857103007/diff/60001/ash/system/night_light/night_light_controller.cc#newcode119 ash/system/night_light/night_light_controller.cc:119: LOG(ERROR) << "Can't initialize NightLight user settings. No " ...
3 years, 7 months ago (2017-05-06 00:49:35 UTC) #33
James Cook
LGTM. I was confused about whether the feature should turn on/off when the button is ...
3 years, 7 months ago (2017-05-08 16:09:08 UTC) #37
afakhry
+thestig@ for chrome/ +mpearson@ for tools/ https://codereview.chromium.org/2857103007/diff/80001/ash/system/tiles/tray_tiles_unittest.cc File ash/system/tiles/tray_tiles_unittest.cc (right): https://codereview.chromium.org/2857103007/diff/80001/ash/system/tiles/tray_tiles_unittest.cc#newcode92 ash/system/tiles/tray_tiles_unittest.cc:92: EXPECT_EQ(Button::STATE_DISABLED, GetNightLightButton()->state()); On ...
3 years, 7 months ago (2017-05-08 17:36:26 UTC) #41
Lei Zhang
chrome/ lgtm
3 years, 7 months ago (2017-05-08 22:02:12 UTC) #44
Mark P
actions.xml lgtm https://codereview.chromium.org/2857103007/diff/140001/tools/metrics/actions/actions.xml File tools/metrics/actions/actions.xml (right): https://codereview.chromium.org/2857103007/diff/140001/tools/metrics/actions/actions.xml#newcode16328 tools/metrics/actions/actions.xml:16328: User action to toggle the Night Light ...
3 years, 7 months ago (2017-05-08 23:18:09 UTC) #45
afakhry
James, I rebased on Xiyuan's change that landed today. We no longer need to listen ...
3 years, 7 months ago (2017-05-09 00:06:30 UTC) #46
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/2857103007/160001
3 years, 7 months ago (2017-05-09 00:49:56 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/379425)
3 years, 7 months ago (2017-05-09 01:41:48 UTC) #51
James Cook
https://codereview.chromium.org/2857103007/diff/160001/ash/system/night_light/night_light_controller.cc File ash/system/night_light/night_light_controller.cc (right): https://codereview.chromium.org/2857103007/diff/160001/ash/system/night_light/night_light_controller.cc#newcode94 ash/system/night_light/night_light_controller.cc:94: // When user is switched in multi profiles. Is ...
3 years, 7 months ago (2017-05-09 02:45:35 UTC) #52
afakhry
https://codereview.chromium.org/2857103007/diff/160001/ash/system/night_light/night_light_controller.cc File ash/system/night_light/night_light_controller.cc (right): https://codereview.chromium.org/2857103007/diff/160001/ash/system/night_light/night_light_controller.cc#newcode94 ash/system/night_light/night_light_controller.cc:94: // When user is switched in multi profiles. On ...
3 years, 7 months ago (2017-05-09 16:32:17 UTC) #53
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/2857103007/180001
3 years, 7 months ago (2017-05-09 16:42:03 UTC) #56
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 18:49:22 UTC) #59
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/e4fae85260876af2c08495ccf33b...

Powered by Google App Engine
This is Rietveld 408576698