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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 EXTENSION_TEST_PASSED, | 689 EXTENSION_TEST_PASSED, |
690 EXTENSION_TEST_FAILED, | 690 EXTENSION_TEST_FAILED, |
691 | 691 |
692 // Privacy Blacklist ------------------------------------------------------- | 692 // Privacy Blacklist ------------------------------------------------------- |
693 | 693 |
694 // Sent by the resource dispatcher host when a resource is blocked. | 694 // Sent by the resource dispatcher host when a resource is blocked. |
695 BLACKLIST_BLOCKED_RESOURCE, | 695 BLACKLIST_BLOCKED_RESOURCE, |
696 | 696 |
697 // Debugging --------------------------------------------------------------- | 697 // Debugging --------------------------------------------------------------- |
698 | 698 |
| 699 // Desktop Notifications --------------------------------------------------- |
| 700 |
| 701 // This notification is sent when a balloon is connected to a renderer |
| 702 // process. The source is a Source<Balloon> with a pointer to the |
| 703 // the balloon. A NOTIFY_BALLOON_DISCONNECTED notification is |
| 704 // guaranteed before the source pointer becomes junk. |
| 705 // No details are expected. |
| 706 NOTIFY_BALLOON_CONNECTED, |
| 707 |
| 708 // This message is sent after a balloon is disconnected from the renderer |
| 709 // process. |
| 710 // The source is a Source<Balloon> with a pointer to the balloon (the pointe
r |
| 711 // is usable). |
| 712 // No details are expected. |
| 713 NOTIFY_BALLOON_DISCONNECTED, |
| 714 |
699 // Count (must be last) ---------------------------------------------------- | 715 // Count (must be last) ---------------------------------------------------- |
700 // Used to determine the number of notification types. Not valid as | 716 // Used to determine the number of notification types. Not valid as |
701 // a type parameter when registering for or posting notifications. | 717 // a type parameter when registering for or posting notifications. |
702 NOTIFICATION_TYPE_COUNT | 718 NOTIFICATION_TYPE_COUNT |
703 }; | 719 }; |
704 | 720 |
705 NotificationType(Type v) : value(v) {} | 721 NotificationType(Type v) : value(v) {} |
706 | 722 |
707 bool operator==(NotificationType t) const { return value == t.value; } | 723 bool operator==(NotificationType t) const { return value == t.value; } |
708 bool operator!=(NotificationType t) const { return value != t.value; } | 724 bool operator!=(NotificationType t) const { return value != t.value; } |
709 | 725 |
710 // Comparison to explicit enum values. | 726 // Comparison to explicit enum values. |
711 bool operator==(Type v) const { return value == v; } | 727 bool operator==(Type v) const { return value == v; } |
712 bool operator!=(Type v) const { return value != v; } | 728 bool operator!=(Type v) const { return value != v; } |
713 | 729 |
714 Type value; | 730 Type value; |
715 }; | 731 }; |
716 | 732 |
717 inline bool operator==(NotificationType::Type a, NotificationType b) { | 733 inline bool operator==(NotificationType::Type a, NotificationType b) { |
718 return a == b.value; | 734 return a == b.value; |
719 } | 735 } |
720 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 736 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
721 return a != b.value; | 737 return a != b.value; |
722 } | 738 } |
723 | 739 |
724 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 740 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |