| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 // Sent when extension render process crashes. The details are | 635 // Sent when extension render process crashes. The details are |
| 636 // an ExtensionHost*. | 636 // an ExtensionHost*. |
| 637 EXTENSION_PROCESS_CRASHED, | 637 EXTENSION_PROCESS_CRASHED, |
| 638 | 638 |
| 639 // Sent when the contents or order of toolstrips in the shelf model change. | 639 // Sent when the contents or order of toolstrips in the shelf model change. |
| 640 EXTENSION_SHELF_MODEL_CHANGED, | 640 EXTENSION_SHELF_MODEL_CHANGED, |
| 641 | 641 |
| 642 // Sent when a background page is ready so other components can load. | 642 // Sent when a background page is ready so other components can load. |
| 643 EXTENSION_BACKGROUND_PAGE_READY, | 643 EXTENSION_BACKGROUND_PAGE_READY, |
| 644 | 644 |
| 645 // Sent by an extension to notify the browser about the results of a unit |
| 646 // test. |
| 647 EXTENSION_TEST_PASSED, |
| 648 EXTENSION_TEST_FAILED, |
| 649 |
| 645 // Debugging --------------------------------------------------------------- | 650 // Debugging --------------------------------------------------------------- |
| 646 | 651 |
| 647 // Count (must be last) ---------------------------------------------------- | 652 // Count (must be last) ---------------------------------------------------- |
| 648 // Used to determine the number of notification types. Not valid as | 653 // Used to determine the number of notification types. Not valid as |
| 649 // a type parameter when registering for or posting notifications. | 654 // a type parameter when registering for or posting notifications. |
| 650 NOTIFICATION_TYPE_COUNT | 655 NOTIFICATION_TYPE_COUNT |
| 651 }; | 656 }; |
| 652 | 657 |
| 653 NotificationType(Type v) : value(v) {} | 658 NotificationType(Type v) : value(v) {} |
| 654 | 659 |
| 655 bool operator==(NotificationType t) const { return value == t.value; } | 660 bool operator==(NotificationType t) const { return value == t.value; } |
| 656 bool operator!=(NotificationType t) const { return value != t.value; } | 661 bool operator!=(NotificationType t) const { return value != t.value; } |
| 657 | 662 |
| 658 // Comparison to explicit enum values. | 663 // Comparison to explicit enum values. |
| 659 bool operator==(Type v) const { return value == v; } | 664 bool operator==(Type v) const { return value == v; } |
| 660 bool operator!=(Type v) const { return value != v; } | 665 bool operator!=(Type v) const { return value != v; } |
| 661 | 666 |
| 662 Type value; | 667 Type value; |
| 663 }; | 668 }; |
| 664 | 669 |
| 665 inline bool operator==(NotificationType::Type a, NotificationType b) { | 670 inline bool operator==(NotificationType::Type a, NotificationType b) { |
| 666 return a == b.value; | 671 return a == b.value; |
| 667 } | 672 } |
| 668 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 673 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
| 669 return a != b.value; | 674 return a != b.value; |
| 670 } | 675 } |
| 671 | 676 |
| 672 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ | 677 #endif // CHROME_COMMON_NOTIFICATION_TYPE_H_ |
| OLD | NEW |