diff options
author | mukai <mukai@chromium.org> | 2015-04-20 18:48:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-21 01:49:06 +0000 |
commit | 2358a2dcd1d5aef0e3b109aa713a8c1242e517a4 (patch) | |
tree | 3212e7b6269537affb4c832b8db7e1fa28b385b8 /ash | |
parent | e86ba5eff720f7e04436056c5753e8d0e9208372 (diff) | |
download | chromium_src-2358a2dcd1d5aef0e3b109aa713a8c1242e517a4.zip chromium_src-2358a2dcd1d5aef0e3b109aa713a8c1242e517a4.tar.gz chromium_src-2358a2dcd1d5aef0e3b109aa713a8c1242e517a4.tar.bz2 |
Makes battery notifier as ash system notifier.
battery notifier is listed in kAlwaysShownNotifierIds but not
in kAshSystemNotifiers, which causes a side effect of being
blocked by MultiUserNotificationBlockerChromeOS when logged in.
BUG=477722
R=stevenjb@chromium.org, michaelpg@chromium.org
TEST=manually verified (see #25 of the bug for the repro steps)
Review URL: https://codereview.chromium.org/1098003002
Cr-Commit-Position: refs/heads/master@{#325966}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/system_notifier.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ash/system/system_notifier.cc b/ash/system/system_notifier.cc index aedd2be..6ff6dcb 100644 --- a/ash/system/system_notifier.cc +++ b/ash/system/system_notifier.cc @@ -17,7 +17,11 @@ namespace { // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/ // system-notifications for the reasoning. -const char* kAlwaysShownNotifierIds[] = { + +// |kAlwaysShownSystemNotifierIds| is the list of system notification sources +// which can appear regardless of the situation, such like login screen or lock +// screen. +const char* kAlwaysShownSystemNotifierIds[] = { kNotifierBattery, kNotifierDisplay, kNotifierDisplayError, @@ -29,19 +33,17 @@ const char* kAlwaysShownNotifierIds[] = { // just add your stuff at the end! NULL}; +// |kAshSystemNotifiers| is the list of normal system notification sources for +// ash events. These notifications can be hidden in some context. const char* kAshSystemNotifiers[] = { kNotifierBluetooth, - kNotifierDisplay, - kNotifierDisplayError, kNotifierDisplayResolutionChange, kNotifierLocale, kNotifierMultiProfileFirstRun, #if defined(OS_CHROMEOS) ui::NetworkStateNotifier::kNotifierNetwork, - ui::NetworkStateNotifier::kNotifierNetworkError, #endif kNotifierNetworkPortalDetector, - kNotifierPower, kNotifierScreenshot, kNotifierScreenCapture, kNotifierScreenShare, @@ -82,11 +84,12 @@ const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; const char kNotifierSupervisedUser[] = "ash.locally-managed-user"; bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { - return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); + return MatchSystemNotifierId(notifier_id, kAlwaysShownSystemNotifierIds); } bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { - return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); + return ShouldAlwaysShowPopups(notifier_id) || + MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); } } // namespace system_notifier |