| 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) 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Requests that a notification be shown. | 56 // Requests that a notification be shown. |
| 57 virtual bool show(Notification*) = 0; | 57 virtual bool show(Notification*) = 0; |
| 58 | 58 |
| 59 // Requests that a notification that has already been shown be canceled. | 59 // Requests that a notification that has already been shown be canceled. |
| 60 virtual void cancel(Notification*) = 0; | 60 virtual void cancel(Notification*) = 0; |
| 61 | 61 |
| 62 // When the user closes a page, or quits the client application, all of the
page's | 62 // When the user closes a page, or quits the client application, all of the
page's |
| 63 // associated notifications are cleared. | 63 // associated notifications are cleared. |
| 64 virtual void clearNotifications(ScriptExecutionContext*) { } | 64 virtual void clearNotifications(ScriptExecutionContext*) { } |
| 65 | 65 |
| 66 // Informs the presenter that a Notification object has been destroyed | 66 // Informs the presenter that a Notification object has been destroyed |
| 67 // (such as by a page transition). The presenter may continue showing | 67 // (such as by a page transition). The presenter may continue showing |
| 68 // the notification, but must not attempt to call the event handlers. | 68 // the notification, but must not attempt to call the event handlers. |
| 69 virtual void notificationObjectDestroyed(Notification*) = 0; | 69 virtual void notificationObjectDestroyed(Notification*) = 0; |
| 70 | 70 |
| 71 // Informs the presenter the controller attached to the page has been destro
yed. | 71 // Informs the presenter the controller attached to the page has been destro
yed. |
| 72 virtual void notificationControllerDestroyed() = 0; | 72 virtual void notificationControllerDestroyed() = 0; |
| 73 | 73 |
| 74 #if ENABLE(LEGACY_NOTIFICATIONS) | 74 #if ENABLE(LEGACY_NOTIFICATIONS) |
| 75 // Requests user permission to show desktop notifications from a particular | 75 // Requests user permission to show desktop notifications from a particular |
| (...skipping 13 matching lines...) Expand all Loading... |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 virtual ~NotificationClient() { } | 91 virtual ~NotificationClient() { } |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 void provideNotification(Page*, NotificationClient*); | 94 void provideNotification(Page*, NotificationClient*); |
| 95 | 95 |
| 96 } // namespace WebCore | 96 } // namespace WebCore |
| 97 | 97 |
| 98 #endif // NotificationClient_h | 98 #endif // NotificationClient_h |
| OLD | NEW |