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 // This file defines the type used to provide details for NotificationService | 5 // This file defines the type used to provide details for NotificationService |
6 // notifications. | 6 // notifications. |
7 | 7 |
8 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ | 8 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ |
9 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ | 9 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ |
10 #pragma once | |
11 | 10 |
12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
13 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
14 | 13 |
15 namespace content { | 14 namespace content { |
16 | 15 |
17 // Do not declare a NotificationDetails directly--use either | 16 // Do not declare a NotificationDetails directly--use either |
18 // "Details<detailsclassname>(detailsclasspointer)" or | 17 // "Details<detailsclassname>(detailsclasspointer)" or |
19 // NotificationService::NoDetails(). | 18 // NotificationService::NoDetails(). |
20 class CONTENT_EXPORT NotificationDetails { | 19 class CONTENT_EXPORT NotificationDetails { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 : NotificationDetails(other) {} | 52 : NotificationDetails(other) {} |
54 | 53 |
55 T* operator->() const { return ptr(); } | 54 T* operator->() const { return ptr(); } |
56 // The casts here allow this to compile with both T = Foo and T = const Foo. | 55 // The casts here allow this to compile with both T = Foo and T = const Foo. |
57 T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); } | 56 T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); } |
58 }; | 57 }; |
59 | 58 |
60 } // namespace content | 59 } // namespace content |
61 | 60 |
62 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ | 61 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_DETAILS_H_ |
OLD | NEW |