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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 | 821 |
822 // Notification that a control in the browser UI had its action taken, | 822 // Notification that a control in the browser UI had its action taken, |
823 // like pressing a button or toggling a checkbox. | 823 // like pressing a button or toggling a checkbox. |
824 // Details will be an AccessibilityControlInfo. | 824 // Details will be an AccessibilityControlInfo. |
825 ACCESSIBILITY_CONTROL_ACTION, | 825 ACCESSIBILITY_CONTROL_ACTION, |
826 | 826 |
827 // Notification that text box in the browser UI had text change. | 827 // Notification that text box in the browser UI had text change. |
828 // Details will be an AccessibilityControlInfo. | 828 // Details will be an AccessibilityControlInfo. |
829 ACCESSIBILITY_TEXT_CHANGED, | 829 ACCESSIBILITY_TEXT_CHANGED, |
830 | 830 |
| 831 // Content Settings -------------------------------------------------------- |
| 832 |
| 833 // Sent when content settings change. The source is a HostContentSettings |
| 834 // object, the details are ContentSettingsNotificationsDetails. |
| 835 CONTENT_SETTINGS_CHANGED, |
| 836 |
831 // Count (must be last) ---------------------------------------------------- | 837 // Count (must be last) ---------------------------------------------------- |
832 // Used to determine the number of notification types. Not valid as | 838 // Used to determine the number of notification types. Not valid as |
833 // a type parameter when registering for or posting notifications. | 839 // a type parameter when registering for or posting notifications. |
834 NOTIFICATION_TYPE_COUNT | 840 NOTIFICATION_TYPE_COUNT |
835 }; | 841 }; |
836 | 842 |
837 // TODO(erg): Our notification system relies on implicit conversion. | 843 // TODO(erg): Our notification system relies on implicit conversion. |
838 NotificationType(Type v) : value(v) {} // NOLINT | 844 NotificationType(Type v) : value(v) {} // NOLINT |
839 | 845 |
840 bool operator==(NotificationType t) const { return value == t.value; } | 846 bool operator==(NotificationType t) const { return value == t.value; } |
841 bool operator!=(NotificationType t) const { return value != t.value; } | 847 bool operator!=(NotificationType t) const { return value != t.value; } |
842 | 848 |
843 // Comparison to explicit enum values. | 849 // Comparison to explicit enum values. |
844 bool operator==(Type v) const { return value == v; } | 850 bool operator==(Type v) const { return value == v; } |
845 bool operator!=(Type v) const { return value != v; } | 851 bool operator!=(Type v) const { return value != v; } |
846 | 852 |
847 Type value; | 853 Type value; |
848 }; | 854 }; |
849 | 855 |
850 inline bool operator==(NotificationType::Type a, NotificationType b) { | 856 inline bool operator==(NotificationType::Type a, NotificationType b) { |
851 return a == b.value; | 857 return a == b.value; |
852 } | 858 } |
853 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 859 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
854 return a != b.value; | 860 return a != b.value; |
855 } | 861 } |
856 | 862 |
857 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 863 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |