| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } | 120 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD
OMObject::executionContext(); } |
| 121 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; | 121 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; |
| 122 | 122 |
| 123 // ActiveDOMObject interface | 123 // ActiveDOMObject interface |
| 124 // Override to prevent this from being collected when in Showing state. | 124 // Override to prevent this from being collected when in Showing state. |
| 125 virtual bool hasPendingActivity() const OVERRIDE; | 125 virtual bool hasPendingActivity() const OVERRIDE; |
| 126 virtual void stop() OVERRIDE; | 126 virtual void stop() OVERRIDE; |
| 127 | 127 |
| 128 static const String& permission(ExecutionContext*); | 128 static const String& permission(ExecutionContext*); |
| 129 static const String& permissionString(NotificationClient::Permission); | 129 static const String& permissionString(NotificationClient::Permission); |
| 130 static void requestPermission(ExecutionContext*, PassRefPtr<NotificationPerm
issionCallback> = 0); | 130 static void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPerm
issionCallback> = nullptr); |
| 131 | 131 |
| 132 private: | 132 private: |
| 133 #if ENABLE(LEGACY_NOTIFICATIONS) | 133 #if ENABLE(LEGACY_NOTIFICATIONS) |
| 134 Notification(const String& title, const String& body, const String& iconURI,
ExecutionContext*, ExceptionState&, PassRefPtr<NotificationCenter>); | 134 Notification(const String& title, const String& body, const String& iconURI,
ExecutionContext*, ExceptionState&, PassRefPtr<NotificationCenter>); |
| 135 #endif | 135 #endif |
| 136 Notification(ExecutionContext*, const String& title); | 136 Notification(ExecutionContext*, const String& title); |
| 137 | 137 |
| 138 void setLang(const String& lang) { m_lang = lang; } | 138 void setLang(const String& lang) { m_lang = lang; } |
| 139 void setBody(const String& body) { m_body = body; } | 139 void setBody(const String& body) { m_body = body; } |
| 140 void setIcon(const KURL& url) { m_icon = url; } | 140 void setIcon(const KURL& url) { m_icon = url; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 159 NotificationState m_state; | 159 NotificationState m_state; |
| 160 | 160 |
| 161 NotificationClient* m_notificationClient; | 161 NotificationClient* m_notificationClient; |
| 162 | 162 |
| 163 OwnPtr<AsyncMethodRunner<Notification> > m_asyncRunner; | 163 OwnPtr<AsyncMethodRunner<Notification> > m_asyncRunner; |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 } // namespace WebCore | 166 } // namespace WebCore |
| 167 | 167 |
| 168 #endif // Notifications_h | 168 #endif // Notifications_h |
| OLD | NEW |