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 { |
(...skipping 12 matching lines...) Expand all Loading... |
23 const char* kAshSystemNotifiers[] = { | 23 const char* kAshSystemNotifiers[] = { |
24 kNotifierDisplay, | 24 kNotifierDisplay, |
25 kNotifierDisplayResolutionChange, | 25 kNotifierDisplayResolutionChange, |
26 kNotifierDisplayError, | 26 kNotifierDisplayError, |
27 kNotifierInputMethod, | 27 kNotifierInputMethod, |
28 kNotifierLocale, | 28 kNotifierLocale, |
29 kNotifierLocallyManagedUser, | 29 kNotifierLocallyManagedUser, |
30 kNotifierMultiProfileFirstRun, | 30 kNotifierMultiProfileFirstRun, |
31 kNotifierNetwork, | 31 kNotifierNetwork, |
32 kNotifierNetworkError, | 32 kNotifierNetworkError, |
| 33 kNotifierNetworkPortalDetector, |
33 kNotifierScreenshot, | 34 kNotifierScreenshot, |
34 kNotifierScreenCapture, | 35 kNotifierScreenCapture, |
35 kNotifierScreenShare, | 36 kNotifierScreenShare, |
36 kNotifierSessionLengthTimeout, | 37 kNotifierSessionLengthTimeout, |
37 kNotifierPower, | 38 kNotifierPower, |
38 NULL | 39 NULL |
39 }; | 40 }; |
40 | 41 |
41 bool MatchSystemNotifierId(const message_center::NotifierId& notifier_id, | 42 bool MatchSystemNotifierId(const message_center::NotifierId& notifier_id, |
42 const char* id_list[]) { | 43 const char* id_list[]) { |
(...skipping 11 matching lines...) Expand all Loading... |
54 | 55 |
55 const char kNotifierDisplay[] = "ash.display"; | 56 const char kNotifierDisplay[] = "ash.display"; |
56 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change"; | 57 const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change"; |
57 const char kNotifierDisplayError[] = "ash.display.error"; | 58 const char kNotifierDisplayError[] = "ash.display.error"; |
58 const char kNotifierInputMethod[] = "ash.input-method"; | 59 const char kNotifierInputMethod[] = "ash.input-method"; |
59 const char kNotifierLocale[] = "ash.locale"; | 60 const char kNotifierLocale[] = "ash.locale"; |
60 const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user"; | 61 const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user"; |
61 const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run"; | 62 const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run"; |
62 const char kNotifierNetwork[] = "ash.network"; | 63 const char kNotifierNetwork[] = "ash.network"; |
63 const char kNotifierNetworkError[] = "ash.network.error"; | 64 const char kNotifierNetworkError[] = "ash.network.error"; |
| 65 const char kNotifierNetworkPortalDetector[] = "ash.network.portal-detector"; |
64 const char kNotifierScreenshot[] = "ash.screenshot"; | 66 const char kNotifierScreenshot[] = "ash.screenshot"; |
65 const char kNotifierScreenCapture[] = "ash.screen-capture"; | 67 const char kNotifierScreenCapture[] = "ash.screen-capture"; |
66 const char kNotifierScreenShare[] = "ash.screen-share"; | 68 const char kNotifierScreenShare[] = "ash.screen-share"; |
67 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; | 69 const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout"; |
68 const char kNotifierPower[] = "ash.power"; | 70 const char kNotifierPower[] = "ash.power"; |
69 | 71 |
70 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { | 72 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) { |
71 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); | 73 return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds); |
72 } | 74 } |
73 | 75 |
74 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { | 76 bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) { |
75 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); | 77 return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers); |
76 } | 78 } |
77 | 79 |
78 } // namespace system_notifier | 80 } // namespace system_notifier |
79 } // namespace ash | 81 } // namespace ash |
OLD | NEW |