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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 // Sent by the resource dispatcher host when a resource is blocked. | 719 // Sent by the resource dispatcher host when a resource is blocked. |
720 BLACKLIST_BLOCKED_RESOURCE, | 720 BLACKLIST_BLOCKED_RESOURCE, |
721 | 721 |
722 // Debugging --------------------------------------------------------------- | 722 // Debugging --------------------------------------------------------------- |
723 | 723 |
724 // TODO(mpcomplete): Sent to diagnose a bug. Remove when fixed. | 724 // TODO(mpcomplete): Sent to diagnose a bug. Remove when fixed. |
725 // http://code.google.com/p/chromium/issues/detail?id=21201 | 725 // http://code.google.com/p/chromium/issues/detail?id=21201 |
726 EXTENSION_PORT_DELETED_DEBUG, | 726 EXTENSION_PORT_DELETED_DEBUG, |
727 | 727 |
| 728 // Desktop Notifications --------------------------------------------------- |
| 729 |
| 730 // This notification is sent when a balloon is connected to a renderer |
| 731 // process to render the balloon contents. The source is a Source<Balloon> |
| 732 // with a pointer to the the balloon. A NOTIFY_BALLOON_DISCONNECTED is |
| 733 // guaranteed before the source pointer becomes junk. No details expected. |
| 734 NOTIFY_BALLOON_CONNECTED, |
| 735 |
| 736 // This message is sent after a balloon is disconnected from the renderer |
| 737 // process. The source is a Source<Balloon> with a pointer to the balloon |
| 738 // (the pointer is usable). No details are expected. |
| 739 NOTIFY_BALLOON_DISCONNECTED, |
| 740 |
728 // Count (must be last) ---------------------------------------------------- | 741 // Count (must be last) ---------------------------------------------------- |
729 // Used to determine the number of notification types. Not valid as | 742 // Used to determine the number of notification types. Not valid as |
730 // a type parameter when registering for or posting notifications. | 743 // a type parameter when registering for or posting notifications. |
731 NOTIFICATION_TYPE_COUNT | 744 NOTIFICATION_TYPE_COUNT |
732 }; | 745 }; |
733 | 746 |
734 NotificationType(Type v) : value(v) {} | 747 NotificationType(Type v) : value(v) {} |
735 | 748 |
736 bool operator==(NotificationType t) const { return value == t.value; } | 749 bool operator==(NotificationType t) const { return value == t.value; } |
737 bool operator!=(NotificationType t) const { return value != t.value; } | 750 bool operator!=(NotificationType t) const { return value != t.value; } |
738 | 751 |
739 // Comparison to explicit enum values. | 752 // Comparison to explicit enum values. |
740 bool operator==(Type v) const { return value == v; } | 753 bool operator==(Type v) const { return value == v; } |
741 bool operator!=(Type v) const { return value != v; } | 754 bool operator!=(Type v) const { return value != v; } |
742 | 755 |
743 Type value; | 756 Type value; |
744 }; | 757 }; |
745 | 758 |
746 inline bool operator==(NotificationType::Type a, NotificationType b) { | 759 inline bool operator==(NotificationType::Type a, NotificationType b) { |
747 return a == b.value; | 760 return a == b.value; |
748 } | 761 } |
749 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 762 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
750 return a != b.value; | 763 return a != b.value; |
751 } | 764 } |
752 | 765 |
753 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 766 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |