OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 5 #ifndef CONTENT_COMMON_NOTIFICATION_TYPE_H_ |
6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This file describes various types used to describe and filter notifications | 9 // This file describes various types used to describe and filter notifications |
10 // that pass through the NotificationService. | 10 // that pass through the NotificationService. |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 EXTENSION_LAUNCHER_REORDERED, | 1291 EXTENSION_LAUNCHER_REORDERED, |
1292 | 1292 |
1293 #if defined(OS_CHROMEOS) | 1293 #if defined(OS_CHROMEOS) |
1294 // Sent when WebSocketProxy started accepting connections. | 1294 // Sent when WebSocketProxy started accepting connections. |
1295 WEB_SOCKET_PROXY_STARTED, | 1295 WEB_SOCKET_PROXY_STARTED, |
1296 #endif | 1296 #endif |
1297 | 1297 |
1298 // Sent when a new web store promo has been loaded. | 1298 // Sent when a new web store promo has been loaded. |
1299 WEB_STORE_PROMO_LOADED, | 1299 WEB_STORE_PROMO_LOADED, |
1300 | 1300 |
| 1301 // Protocol Handler Registry ----------------------------------------------- |
| 1302 // Sent when a ProtocolHandlerRegistry is changed. |
| 1303 PROTOCOL_HANDLER_REGISTRY_CHANGED, |
| 1304 |
| 1305 // Sent when a ProtocolHandlerRegistry is loaded. |
| 1306 PROTOCOL_HANDLER_REGISTRY_LOADED, |
| 1307 |
1301 // Count (must be last) ---------------------------------------------------- | 1308 // Count (must be last) ---------------------------------------------------- |
1302 // Used to determine the number of notification types. Not valid as | 1309 // Used to determine the number of notification types. Not valid as |
1303 // a type parameter when registering for or posting notifications. | 1310 // a type parameter when registering for or posting notifications. |
1304 NOTIFICATION_TYPE_COUNT | 1311 NOTIFICATION_TYPE_COUNT |
1305 }; | 1312 }; |
1306 | 1313 |
1307 // TODO(erg): Our notification system relies on implicit conversion. | 1314 // TODO(erg): Our notification system relies on implicit conversion. |
1308 NotificationType(Type v) : value(v) {} // NOLINT | 1315 NotificationType(Type v) : value(v) {} // NOLINT |
1309 | 1316 |
1310 bool operator==(NotificationType t) const { return value == t.value; } | 1317 bool operator==(NotificationType t) const { return value == t.value; } |
1311 bool operator!=(NotificationType t) const { return value != t.value; } | 1318 bool operator!=(NotificationType t) const { return value != t.value; } |
1312 | 1319 |
1313 // Comparison to explicit enum values. | 1320 // Comparison to explicit enum values. |
1314 bool operator==(Type v) const { return value == v; } | 1321 bool operator==(Type v) const { return value == v; } |
1315 bool operator!=(Type v) const { return value != v; } | 1322 bool operator!=(Type v) const { return value != v; } |
1316 | 1323 |
1317 Type value; | 1324 Type value; |
1318 }; | 1325 }; |
1319 | 1326 |
1320 inline bool operator==(NotificationType::Type a, NotificationType b) { | 1327 inline bool operator==(NotificationType::Type a, NotificationType b) { |
1321 return a == b.value; | 1328 return a == b.value; |
1322 } | 1329 } |
1323 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 1330 inline bool operator!=(NotificationType::Type a, NotificationType b) { |
1324 return a != b.value; | 1331 return a != b.value; |
1325 } | 1332 } |
1326 | 1333 |
1327 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 1334 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ |
OLD | NEW |