| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 // This file describes various types used to describe and filter notifications | 8 // This file describes various types used to describe and filter notifications |
| 9 // that pass through the NotificationService. | 9 // that pass through the NotificationService. |
| 10 // | 10 // |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 | 866 |
| 867 #if defined(OS_CHROMEOS) | 867 #if defined(OS_CHROMEOS) |
| 868 // Sent when a chromium os user logs in. | 868 // Sent when a chromium os user logs in. |
| 869 LOGIN_USER_CHANGED, | 869 LOGIN_USER_CHANGED, |
| 870 | 870 |
| 871 // Sent when a chromium os user attempts to log in. The source is | 871 // Sent when a chromium os user attempts to log in. The source is |
| 872 // all and the details are AuthenticationNotificationDetails. | 872 // all and the details are AuthenticationNotificationDetails. |
| 873 LOGIN_AUTHENTICATION, | 873 LOGIN_AUTHENTICATION, |
| 874 #endif | 874 #endif |
| 875 | 875 |
| 876 // Sent before a page is reloaded or the repost form warning is brought up. |
| 877 // The source is a NavigationController. |
| 878 RELOADING, |
| 879 |
| 876 // Count (must be last) ---------------------------------------------------- | 880 // Count (must be last) ---------------------------------------------------- |
| 877 // Used to determine the number of notification types. Not valid as | 881 // Used to determine the number of notification types. Not valid as |
| 878 // a type parameter when registering for or posting notifications. | 882 // a type parameter when registering for or posting notifications. |
| 879 NOTIFICATION_TYPE_COUNT | 883 NOTIFICATION_TYPE_COUNT |
| 880 }; | 884 }; |
| 881 | 885 |
| 882 // TODO(erg): Our notification system relies on implicit conversion. | 886 // TODO(erg): Our notification system relies on implicit conversion. |
| 883 NotificationType(Type v) : value(v) {} // NOLINT | 887 NotificationType(Type v) : value(v) {} // NOLINT |
| 884 | 888 |
| 885 bool operator==(NotificationType t) const { return value == t.value; } | 889 bool operator==(NotificationType t) const { return value == t.value; } |
| 886 bool operator!=(NotificationType t) const { return value != t.value; } | 890 bool operator!=(NotificationType t) const { return value != t.value; } |
| 887 | 891 |
| 888 // Comparison to explicit enum values. | 892 // Comparison to explicit enum values. |
| 889 bool operator==(Type v) const { return value == v; } | 893 bool operator==(Type v) const { return value == v; } |
| 890 bool operator!=(Type v) const { return value != v; } | 894 bool operator!=(Type v) const { return value != v; } |
| 891 | 895 |
| 892 Type value; | 896 Type value; |
| 893 }; | 897 }; |
| 894 | 898 |
| 895 inline bool operator==(NotificationType::Type a, NotificationType b) { | 899 inline bool operator==(NotificationType::Type a, NotificationType b) { |
| 896 return a == b.value; | 900 return a == b.value; |
| 897 } | 901 } |
| 898 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 902 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
| 899 return a != b.value; | 903 return a != b.value; |
| 900 } | 904 } |
| 901 | 905 |
| 902 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 906 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
| OLD | NEW |