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 18 matching lines...) Expand all Loading... |
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 "../platform/WebPrivatePtr.h" | 35 #include "../platform/WebPrivatePtr.h" |
36 #include "../platform/WebString.h" | 36 #include "../platform/WebString.h" |
37 #include "WebTextDirection.h" | 37 #include "WebTextDirection.h" |
38 | 38 |
39 namespace WebCore { class Notification; } | 39 namespace blink { class Notification; } |
40 | 40 |
41 #if BLINK_IMPLEMENTATION | 41 #if BLINK_IMPLEMENTATION |
42 namespace WTF { template <typename T> class PassRefPtr; } | 42 namespace WTF { template <typename T> class PassRefPtr; } |
43 #endif | 43 #endif |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class WebURL; | 47 class WebURL; |
48 | 48 |
49 // Represents access to a desktop notification. | 49 // Represents access to a desktop notification. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 BLINK_EXPORT void dispatchCloseEvent(bool byUser); | 86 BLINK_EXPORT void dispatchCloseEvent(bool byUser); |
87 | 87 |
88 // Called to indicate the notification was clicked on. | 88 // Called to indicate the notification was clicked on. |
89 BLINK_EXPORT void dispatchClickEvent(); | 89 BLINK_EXPORT void dispatchClickEvent(); |
90 | 90 |
91 // FIXME: Remove these methods once Chromium switched to the new APIs. | 91 // FIXME: Remove these methods once Chromium switched to the new APIs. |
92 WebString replaceId() const { return tag(); } | 92 WebString replaceId() const { return tag(); } |
93 void dispatchDisplayEvent() { dispatchShowEvent(); } | 93 void dispatchDisplayEvent() { dispatchShowEvent(); } |
94 | 94 |
95 #if BLINK_IMPLEMENTATION | 95 #if BLINK_IMPLEMENTATION |
96 WebNotification(WebCore::Notification*); | 96 WebNotification(blink::Notification*); |
97 WebNotification& operator=(WebCore::Notification*); | 97 WebNotification& operator=(blink::Notification*); |
98 #endif | 98 #endif |
99 | 99 |
100 private: | 100 private: |
101 WebPrivatePtr<WebCore::Notification> m_private; | 101 WebPrivatePtr<blink::Notification> m_private; |
102 }; | 102 }; |
103 | 103 |
104 inline bool operator==(const WebNotification& a, const WebNotification& b) | 104 inline bool operator==(const WebNotification& a, const WebNotification& b) |
105 { | 105 { |
106 return a.equals(b); | 106 return a.equals(b); |
107 } | 107 } |
108 | 108 |
109 inline bool operator!=(const WebNotification& a, const WebNotification& b) | 109 inline bool operator!=(const WebNotification& a, const WebNotification& b) |
110 { | 110 { |
111 return !a.equals(b); | 111 return !a.equals(b); |
112 } | 112 } |
113 | 113 |
114 inline bool operator<(const WebNotification& a, const WebNotification& b) | 114 inline bool operator<(const WebNotification& a, const WebNotification& b) |
115 { | 115 { |
116 return a.lessThan(b); | 116 return a.lessThan(b); |
117 } | 117 } |
118 | 118 |
119 } // namespace blink | 119 } // namespace blink |
120 | 120 |
121 #endif | 121 #endif |
OLD | NEW |