OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 INSTANT_CONTROLLER_SHOWN, | 1298 INSTANT_CONTROLLER_SHOWN, |
1299 | 1299 |
1300 // Password Store ---------------------------------------------------------- | 1300 // Password Store ---------------------------------------------------------- |
1301 // This notification is sent whenenever login entries stored in the password | 1301 // This notification is sent whenenever login entries stored in the password |
1302 // store are changed. The detail of this notification is a list of changes | 1302 // store are changed. The detail of this notification is a list of changes |
1303 // represented by a vector of PasswordStoreChange. Each change includes a | 1303 // represented by a vector of PasswordStoreChange. Each change includes a |
1304 // change type (ADD, UPDATE, or REMOVE) as well as the | 1304 // change type (ADD, UPDATE, or REMOVE) as well as the |
1305 // |webkit_glue::PasswordForm|s that were affected. | 1305 // |webkit_glue::PasswordForm|s that were affected. |
1306 LOGINS_CHANGED, | 1306 LOGINS_CHANGED, |
1307 | 1307 |
| 1308 // Sent when the applications in the NTP app launcher have been reordered. |
| 1309 EXTENSION_LAUNCHER_REORDERED, |
| 1310 |
1308 // Count (must be last) ---------------------------------------------------- | 1311 // Count (must be last) ---------------------------------------------------- |
1309 // Used to determine the number of notification types. Not valid as | 1312 // Used to determine the number of notification types. Not valid as |
1310 // a type parameter when registering for or posting notifications. | 1313 // a type parameter when registering for or posting notifications. |
1311 NOTIFICATION_TYPE_COUNT | 1314 NOTIFICATION_TYPE_COUNT |
1312 }; | 1315 }; |
1313 | 1316 |
1314 // TODO(erg): Our notification system relies on implicit conversion. | 1317 // TODO(erg): Our notification system relies on implicit conversion. |
1315 NotificationType(Type v) : value(v) {} // NOLINT | 1318 NotificationType(Type v) : value(v) {} // NOLINT |
1316 | 1319 |
1317 bool operator==(NotificationType t) const { return value == t.value; } | 1320 bool operator==(NotificationType t) const { return value == t.value; } |
1318 bool operator!=(NotificationType t) const { return value != t.value; } | 1321 bool operator!=(NotificationType t) const { return value != t.value; } |
1319 | 1322 |
1320 // Comparison to explicit enum values. | 1323 // Comparison to explicit enum values. |
1321 bool operator==(Type v) const { return value == v; } | 1324 bool operator==(Type v) const { return value == v; } |
1322 bool operator!=(Type v) const { return value != v; } | 1325 bool operator!=(Type v) const { return value != v; } |
1323 | 1326 |
1324 Type value; | 1327 Type value; |
1325 }; | 1328 }; |
1326 | 1329 |
1327 inline bool operator==(NotificationType::Type a, NotificationType b) { | 1330 inline bool operator==(NotificationType::Type a, NotificationType b) { |
1328 return a == b.value; | 1331 return a == b.value; |
1329 } | 1332 } |
1330 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 1333 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
1331 return a != b.value; | 1334 return a != b.value; |
1332 } | 1335 } |
1333 | 1336 |
1334 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 1337 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |