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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 // This notification is sent whenever the web database service has finished | 791 // This notification is sent whenever the web database service has finished |
792 // loading the web database. No details are expected. | 792 // loading the web database. No details are expected. |
793 WEB_DATABASE_LOADED, | 793 WEB_DATABASE_LOADED, |
794 | 794 |
795 // Purge Memory ------------------------------------------------------------ | 795 // Purge Memory ------------------------------------------------------------ |
796 | 796 |
797 // Sent on the IO thread when the system should try to reduce the amount of | 797 // Sent on the IO thread when the system should try to reduce the amount of |
798 // memory in use, no source or details are passed. See memory_purger.h .cc. | 798 // memory in use, no source or details are passed. See memory_purger.h .cc. |
799 PURGE_MEMORY, | 799 PURGE_MEMORY, |
800 | 800 |
| 801 // Accessibility Notifications --------------------------------------------- |
| 802 |
| 803 // Notification that a window in the browser UI (not the web content) |
| 804 // was opened, for propagating to an accessibility extension. |
| 805 // Details will be an AccessibilityWindowInfo. |
| 806 ACCESSIBILITY_WINDOW_OPENED, |
| 807 |
| 808 // Notification that a window in the browser UI was closed. |
| 809 // Details will be an AccessibilityWindowInfo. |
| 810 ACCESSIBILITY_WINDOW_CLOSED, |
| 811 |
| 812 // Notification that a control in the browser UI was focused. |
| 813 // Details will be an AccessibilityControlInfo. |
| 814 ACCESSIBILITY_CONTROL_FOCUSED, |
| 815 |
| 816 // Notification that a control in the browser UI had its action taken, |
| 817 // like pressing a button or toggling a checkbox. |
| 818 // Details will be an AccessibilityControlInfo. |
| 819 ACCESSIBILITY_CONTROL_ACTION, |
| 820 |
| 821 // Notification that text box in the browser UI had text change. |
| 822 // Details will be an AccessibilityControlInfo. |
| 823 ACCESSIBILITY_TEXT_CHANGED, |
| 824 |
801 // Count (must be last) ---------------------------------------------------- | 825 // Count (must be last) ---------------------------------------------------- |
802 // Used to determine the number of notification types. Not valid as | 826 // Used to determine the number of notification types. Not valid as |
803 // a type parameter when registering for or posting notifications. | 827 // a type parameter when registering for or posting notifications. |
804 NOTIFICATION_TYPE_COUNT | 828 NOTIFICATION_TYPE_COUNT |
805 }; | 829 }; |
806 | 830 |
807 // TODO(erg): Our notification system relies on implicit conversion. | 831 // TODO(erg): Our notification system relies on implicit conversion. |
808 NotificationType(Type v) : value(v) {} // NOLINT | 832 NotificationType(Type v) : value(v) {} // NOLINT |
809 | 833 |
810 bool operator==(NotificationType t) const { return value == t.value; } | 834 bool operator==(NotificationType t) const { return value == t.value; } |
811 bool operator!=(NotificationType t) const { return value != t.value; } | 835 bool operator!=(NotificationType t) const { return value != t.value; } |
812 | 836 |
813 // Comparison to explicit enum values. | 837 // Comparison to explicit enum values. |
814 bool operator==(Type v) const { return value == v; } | 838 bool operator==(Type v) const { return value == v; } |
815 bool operator!=(Type v) const { return value != v; } | 839 bool operator!=(Type v) const { return value != v; } |
816 | 840 |
817 Type value; | 841 Type value; |
818 }; | 842 }; |
819 | 843 |
820 inline bool operator==(NotificationType::Type a, NotificationType b) { | 844 inline bool operator==(NotificationType::Type a, NotificationType b) { |
821 return a == b.value; | 845 return a == b.value; |
822 } | 846 } |
823 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 847 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
824 return a != b.value; | 848 return a != b.value; |
825 } | 849 } |
826 | 850 |
827 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 851 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |