| 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 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1339     PRERENDER_CONTENTS_STARTED, | 1339     PRERENDER_CONTENTS_STARTED, | 
| 1340 | 1340 | 
| 1341     // Sent when a prerender::PrerenderContents object is destroyed. Source is | 1341     // Sent when a prerender::PrerenderContents object is destroyed. Source is | 
| 1342     // the process/route id pair for the RenderViewHost. There are no details. | 1342     // the process/route id pair for the RenderViewHost. There are no details. | 
| 1343     PRERENDER_CONTENTS_DESTROYED, | 1343     PRERENDER_CONTENTS_DESTROYED, | 
| 1344 | 1344 | 
| 1345     // Sent when a prerender::PrerenderContents is used. Source is the | 1345     // Sent when a prerender::PrerenderContents is used. Source is the | 
| 1346     // process/route id pair for the RenderViewHost. There are no details. | 1346     // process/route id pair for the RenderViewHost. There are no details. | 
| 1347     PRERENDER_CONTENTS_USED, | 1347     PRERENDER_CONTENTS_USED, | 
| 1348 | 1348 | 
|  | 1349     // Sent when a new web store promo has been loaded. | 
|  | 1350     WEB_STORE_PROMO_LOADED, | 
|  | 1351 | 
| 1349     // Count (must be last) ---------------------------------------------------- | 1352     // Count (must be last) ---------------------------------------------------- | 
| 1350     // Used to determine the number of notification types.  Not valid as | 1353     // Used to determine the number of notification types.  Not valid as | 
| 1351     // a type parameter when registering for or posting notifications. | 1354     // a type parameter when registering for or posting notifications. | 
| 1352     NOTIFICATION_TYPE_COUNT | 1355     NOTIFICATION_TYPE_COUNT | 
| 1353   }; | 1356   }; | 
| 1354 | 1357 | 
| 1355   // TODO(erg): Our notification system relies on implicit conversion. | 1358   // TODO(erg): Our notification system relies on implicit conversion. | 
| 1356   NotificationType(Type v) : value(v) {}  // NOLINT | 1359   NotificationType(Type v) : value(v) {}  // NOLINT | 
| 1357 | 1360 | 
| 1358   bool operator==(NotificationType t) const { return value == t.value; } | 1361   bool operator==(NotificationType t) const { return value == t.value; } | 
| 1359   bool operator!=(NotificationType t) const { return value != t.value; } | 1362   bool operator!=(NotificationType t) const { return value != t.value; } | 
| 1360 | 1363 | 
| 1361   // Comparison to explicit enum values. | 1364   // Comparison to explicit enum values. | 
| 1362   bool operator==(Type v) const { return value == v; } | 1365   bool operator==(Type v) const { return value == v; } | 
| 1363   bool operator!=(Type v) const { return value != v; } | 1366   bool operator!=(Type v) const { return value != v; } | 
| 1364 | 1367 | 
| 1365   Type value; | 1368   Type value; | 
| 1366 }; | 1369 }; | 
| 1367 | 1370 | 
| 1368 inline bool operator==(NotificationType::Type a, NotificationType b) { | 1371 inline bool operator==(NotificationType::Type a, NotificationType b) { | 
| 1369   return a == b.value; | 1372   return a == b.value; | 
| 1370 } | 1373 } | 
| 1371 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 1374 inline bool operator!=(NotificationType::Type a, NotificationType b) { | 
| 1372   return a != b.value; | 1375   return a != b.value; | 
| 1373 } | 1376 } | 
| 1374 | 1377 | 
| 1375 #endif  // CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 1378 #endif  // CONTENT_COMMON_NOTIFICATION_TYPE_H_ | 
| OLD | NEW | 
|---|