| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 76 // script context. The callback parameter should be run when the user has | 76 // script context. The callback parameter should be run when the user has |
| 77 // made a decision. | 77 // made a decision. |
| 78 virtual void requestPermission(ExecutionContext*, PassRefPtr<VoidCallback>)
= 0; | 78 virtual void requestPermission(ExecutionContext*, PassRefPtr<VoidCallback>)
= 0; |
| 79 #endif | 79 #endif |
| 80 virtual void requestPermission(ExecutionContext*, PassRefPtr<NotificationPer
missionCallback>) = 0; | 80 virtual void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPer
missionCallback>) = 0; |
| 81 | 81 |
| 82 // Cancel all outstanding requests for the ExecutionContext | 82 // Cancel all outstanding requests for the ExecutionContext |
| 83 virtual void cancelRequestsForPermission(ExecutionContext*) = 0; | 83 virtual void cancelRequestsForPermission(ExecutionContext*) = 0; |
| 84 | 84 |
| 85 // Checks the current level of permission. | 85 // Checks the current level of permission. |
| 86 virtual Permission checkPermission(ExecutionContext*) = 0; | 86 virtual Permission checkPermission(ExecutionContext*) = 0; |
| 87 | 87 |
| 88 protected: | 88 protected: |
| 89 virtual ~NotificationClient() { } | 89 virtual ~NotificationClient() { } |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 void provideNotification(Page*, NotificationClient*); | 92 void provideNotification(Page*, NotificationClient*); |
| 93 | 93 |
| 94 } // namespace WebCore | 94 } // namespace WebCore |
| 95 | 95 |
| 96 #endif // NotificationClient_h | 96 #endif // NotificationClient_h |
| OLD | NEW |