OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebNotification_h | 31 #ifndef WebNotification_h |
32 #define WebNotification_h | 32 #define WebNotification_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 #include "WebTextDirection.h" | 35 #include "WebTextDirection.h" |
36 | 36 |
37 #if BLINK_IMPLEMENTATION | 37 #if BLINK_IMPLEMENTATION |
38 namespace WebCore { class Notification; } | 38 namespace WebCore { class NotificationBase; } |
39 namespace WTF { template <typename T> class PassRefPtr; } | 39 namespace WTF { template <typename T> class PassRefPtr; } |
40 #endif | 40 #endif |
41 | 41 |
42 namespace WTF { | 42 namespace WTF { |
43 class AtomicString; | 43 class AtomicString; |
44 } | 44 } |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class WebNotificationPrivate; | 48 class WebNotificationPrivate; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Called to indicate the notification has been closed. If it was | 92 // Called to indicate the notification has been closed. If it was |
93 // closed by the user (as opposed to automatically by the system), | 93 // closed by the user (as opposed to automatically by the system), |
94 // the byUser parameter will be true. | 94 // the byUser parameter will be true. |
95 BLINK_EXPORT void dispatchCloseEvent(bool byUser); | 95 BLINK_EXPORT void dispatchCloseEvent(bool byUser); |
96 | 96 |
97 // Called to indicate the notification was clicked on. | 97 // Called to indicate the notification was clicked on. |
98 BLINK_EXPORT void dispatchClickEvent(); | 98 BLINK_EXPORT void dispatchClickEvent(); |
99 | 99 |
100 #if BLINK_IMPLEMENTATION | 100 #if BLINK_IMPLEMENTATION |
101 WebNotification(const WTF::PassRefPtr<WebCore::Notification>&); | 101 WebNotification(const WTF::PassRefPtr<WebCore::NotificationBase>&); |
102 WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&); | 102 WebNotification& operator=(const WTF::PassRefPtr<WebCore::NotificationBase>&
); |
103 operator WTF::PassRefPtr<WebCore::Notification>() const; | 103 operator WTF::PassRefPtr<WebCore::NotificationBase>() const; |
104 #endif | 104 #endif |
105 | 105 |
106 private: | 106 private: |
107 void assign(WebNotificationPrivate*); | 107 void assign(WebNotificationPrivate*); |
108 WebNotificationPrivate* m_private; | 108 WebNotificationPrivate* m_private; |
109 }; | 109 }; |
110 | 110 |
111 inline bool operator==(const WebNotification& a, const WebNotification& b) | 111 inline bool operator==(const WebNotification& a, const WebNotification& b) |
112 { | 112 { |
113 return a.equals(b); | 113 return a.equals(b); |
114 } | 114 } |
115 | 115 |
116 inline bool operator!=(const WebNotification& a, const WebNotification& b) | 116 inline bool operator!=(const WebNotification& a, const WebNotification& b) |
117 { | 117 { |
118 return !a.equals(b); | 118 return !a.equals(b); |
119 } | 119 } |
120 | 120 |
121 inline bool operator<(const WebNotification& a, const WebNotification& b) | 121 inline bool operator<(const WebNotification& a, const WebNotification& b) |
122 { | 122 { |
123 return a.lessThan(b); | 123 return a.lessThan(b); |
124 } | 124 } |
125 | 125 |
126 } // namespace blink | 126 } // namespace blink |
127 | 127 |
128 #endif | 128 #endif |
OLD | NEW |