| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_COMMON_NOTIFICATION_TYPE_H_ | 5 #ifndef CHROME_COMMON_NOTIFICATION_TYPE_H_ |
| 6 #define CHROME_COMMON_NOTIFICATION_TYPE_H_ | 6 #define CHROME_COMMON_NOTIFICATION_TYPE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // This file describes various types used to describe and filter notifications | 9 // This file describes various types used to describe and filter notifications |
| 10 // that pass through the NotificationService. | 10 // that pass through the NotificationService. |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 TAB_CLOSEABLE_STATE_CHANGED, | 1111 TAB_CLOSEABLE_STATE_CHANGED, |
| 1112 | 1112 |
| 1113 // Password Store ---------------------------------------------------------- | 1113 // Password Store ---------------------------------------------------------- |
| 1114 // This notification is sent whenenever login entries stored in the password | 1114 // This notification is sent whenenever login entries stored in the password |
| 1115 // store are changed. The detail of this notification is a list of changes | 1115 // store are changed. The detail of this notification is a list of changes |
| 1116 // represented by a vector of PasswordStoreChange. Each change includes a | 1116 // represented by a vector of PasswordStoreChange. Each change includes a |
| 1117 // change type (ADD, UPDATE, or REMOVE) as well as the | 1117 // change type (ADD, UPDATE, or REMOVE) as well as the |
| 1118 // |webkit_glue::PasswordForm|s that were affected. | 1118 // |webkit_glue::PasswordForm|s that were affected. |
| 1119 LOGINS_CHANGED, | 1119 LOGINS_CHANGED, |
| 1120 | 1120 |
| 1121 // Configuration Policy ---------------------------------------------------- |
| 1122 // This notification is sent whenever the administrator changes policy. |
| 1123 // The detail of this notification is not used. |
| 1124 POLICY_CHANGED, |
| 1125 |
| 1121 // Count (must be last) ---------------------------------------------------- | 1126 // Count (must be last) ---------------------------------------------------- |
| 1122 // Used to determine the number of notification types. Not valid as | 1127 // Used to determine the number of notification types. Not valid as |
| 1123 // a type parameter when registering for or posting notifications. | 1128 // a type parameter when registering for or posting notifications. |
| 1124 NOTIFICATION_TYPE_COUNT | 1129 NOTIFICATION_TYPE_COUNT |
| 1125 }; | 1130 }; |
| 1126 | 1131 |
| 1127 // TODO(erg): Our notification system relies on implicit conversion. | 1132 // TODO(erg): Our notification system relies on implicit conversion. |
| 1128 NotificationType(Type v) : value(v) {} // NOLINT | 1133 NotificationType(Type v) : value(v) {} // NOLINT |
| 1129 | 1134 |
| 1130 bool operator==(NotificationType t) const { return value == t.value; } | 1135 bool operator==(NotificationType t) const { return value == t.value; } |
| 1131 bool operator!=(NotificationType t) const { return value != t.value; } | 1136 bool operator!=(NotificationType t) const { return value != t.value; } |
| 1132 | 1137 |
| 1133 // Comparison to explicit enum values. | 1138 // Comparison to explicit enum values. |
| 1134 bool operator==(Type v) const { return value == v; } | 1139 bool operator==(Type v) const { return value == v; } |
| 1135 bool operator!=(Type v) const { return value != v; } | 1140 bool operator!=(Type v) const { return value != v; } |
| 1136 | 1141 |
| 1137 Type value; | 1142 Type value; |
| 1138 }; | 1143 }; |
| 1139 | 1144 |
| 1140 inline bool operator==(NotificationType::Type a, NotificationType b) { | 1145 inline bool operator==(NotificationType::Type a, NotificationType b) { |
| 1141 return a == b.value; | 1146 return a == b.value; |
| 1142 } | 1147 } |
| 1143 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 1148 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
| 1144 return a != b.value; | 1149 return a != b.value; |
| 1145 } | 1150 } |
| 1146 | 1151 |
| 1147 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 1152 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
| OLD | NEW |