Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/system_notifier.h" | 5 #include "ash/system/system_notifier.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace ash { | 9 namespace ash { |
| 10 namespace system_notifier { | 10 namespace system_notifier { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/ | 14 // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/ |
| 15 // system-notifications for the reasoning. | 15 // system-notifications for the reasoning. |
| 16 const char* kAlwaysShownNotifierIds[] = { | 16 const char* kAlwaysShownNotifierIds[] = { |
| 17 kNotifierDisplay, | 17 kNotifierDisplay, |
| 18 kNotifierDisplayError, | 18 kNotifierDisplayError, |
| 19 kNotifierNetworkError, | 19 kNotifierNetworkError, |
| 20 kNotifierPower, | 20 kNotifierPower, |
| 21 NULL | 21 NULL |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 const char* kAshSystemNotifiers[] = { | 24 const char* kAshSystemNotifiers[] = { |
| 25 kNotifierDisplay, | 25 kNotifierDisplay, |
| 26 kNotifierDisplayResolutionChange, | 26 kNotifierDisplayResolutionChange, |
| 27 kNotifierDisplayError, | 27 kNotifierDisplayError, |
| 28 kNotifierLocale, | 28 kNotifierLocale, |
| 29 kNotifierLocallyManagedUser, | 29 kNotifierSupervisedUser, |
|
Pam (message me for reviews)
2014/07/16 18:12:36
It looks like the order of these is not important,
Marc Treib
2014/07/17 08:58:39
Done.
| |
| 30 kNotifierMultiProfileFirstRun, | 30 kNotifierMultiProfileFirstRun, |
| 31 kNotifierNetwork, | 31 kNotifierNetwork, |
| 32 kNotifierNetworkError, | 32 kNotifierNetworkError, |
| 33 kNotifierNetworkPortalDetector, | 33 kNotifierNetworkPortalDetector, |
| 34 kNotifierScreenshot, | 34 kNotifierScreenshot, |
| 35 kNotifierScreenCapture, | 35 kNotifierScreenCapture, |
| 36 kNotifierScreenShare, | 36 kNotifierScreenShare, |
| 37 kNotifierSessionLengthTimeout, | 37 kNotifierSessionLengthTimeout, |
| 38 kNotifierPower, | 38 kNotifierPower, |
| 39 kNotifierBluetooth, | 39 kNotifierBluetooth, |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 52 return false; | 52 return false; |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace | 55 } // namespace |
| 56 | 56 |
| 57 const char kNotifierBluetooth[] = "ash.bluetooth"; | 57 const char kNotifierBluetooth[] = "ash.bluetooth"; |
| 58 const char kNotifierDisplay[] = "ash.display"; | 58 const char kNotifierDisplay[] = "ash.display"; |
| 59 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change"; | 59 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change"; |
| 60 const char kNotifierDisplayError[] = "ash.display.error"; | 60 const char kNotifierDisplayError[] = "ash.display.error"; |
| 61 const char kNotifierLocale[] = "ash.locale"; | 61 const char kNotifierLocale[] = "ash.locale"; |
| 62 const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user"; | 62 const char kNotifierSupervisedUser[] = "ash.locally-managed-user"; |
|
Pam (message me for reviews)
2014/07/16 18:12:36
here too
Marc Treib
2014/07/17 08:58:39
Done.
| |
| 63 const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run"; | 63 const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run"; |
| 64 const char kNotifierNetwork[] = "ash.network"; | 64 const char kNotifierNetwork[] = "ash.network"; |
| 65 const char kNotifierNetworkError[] = "ash.network.error"; | 65 const char kNotifierNetworkError[] = "ash.network.error"; |
| 66 const char kNotifierNetworkPortalDetector[] = "ash.network.portal-detector"; | 66 const char kNotifierNetworkPortalDetector[] = "ash.network.portal-detector"; |
| 67 const char kNotifierPower[] = "ash.power"; | 67 const char kNotifierPower[] = "ash.power"; |
| 68 const char kNotifierScreenshot[] = "ash.screenshot"; | 68 const char kNotifierScreenshot[] = "ash.screenshot"; |
| 69 const char kNotifierScreenCapture[] = "ash.screen-capture"; | 69 const char kNotifierScreenCapture[] = "ash.screen-capture"; |
| 70 const char kNotifierScreenShare[] = "ash.screen-share"; | 70 const char kNotifierScreenShare[] = "ash.screen-share"; |
| 71 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; | 71 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; |
| 72 | 72 |
| 73 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { | 73 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { |
| 74 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); | 74 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { | 77 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { |
| 78 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); | 78 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace system_notifier | 81 } // namespace system_notifier |
| 82 } // namespace ash | 82 } // namespace ash |
| OLD | NEW |