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 WebNotificationPresenter_h | 31 #ifndef WebNotificationPresenter_h |
32 #define WebNotificationPresenter_h | 32 #define WebNotificationPresenter_h |
33 | 33 |
34 #include "../platform/WebString.h" | 34 #include "../platform/WebString.h" |
35 #include "WebNotificationPermissionCallback.h" | 35 #include "WebNotificationPermissionCallback.h" |
36 #include "WebSecurityOrigin.h" | 36 #include "WebSecurityOrigin.h" |
37 | 37 |
38 namespace WebKit { | 38 namespace blink { |
39 | 39 |
40 class WebDocument; | 40 class WebDocument; |
41 class WebNotification; | 41 class WebNotification; |
42 | 42 |
43 // Provides the services to show desktop notifications to the user. | 43 // Provides the services to show desktop notifications to the user. |
44 class WebNotificationPresenter { | 44 class WebNotificationPresenter { |
45 public: | 45 public: |
46 enum Permission { | 46 enum Permission { |
47 PermissionAllowed, // User has allowed permission to the origin. | 47 PermissionAllowed, // User has allowed permission to the origin. |
48 PermissionNotAllowed, // User has not taken an action on the origin (de
faults to not allowed). | 48 PermissionNotAllowed, // User has not taken an action on the origin (de
faults to not allowed). |
(...skipping 12 matching lines...) Expand all Loading... |
61 | 61 |
62 // Checks the permission level for the given origin. | 62 // Checks the permission level for the given origin. |
63 virtual Permission checkPermission(const WebSecurityOrigin&) = 0; | 63 virtual Permission checkPermission(const WebSecurityOrigin&) = 0; |
64 | 64 |
65 // Requests permission for a given origin. This operation is asynchronous a
nd the callback provided | 65 // Requests permission for a given origin. This operation is asynchronous a
nd the callback provided |
66 // will be invoked when the permission decision is made. Callback pointer m
ust remain | 66 // will be invoked when the permission decision is made. Callback pointer m
ust remain |
67 // valid until called. | 67 // valid until called. |
68 virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPerm
issionCallback*) = 0; | 68 virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPerm
issionCallback*) = 0; |
69 }; | 69 }; |
70 | 70 |
71 } // namespace WebKit | 71 } // namespace blink |
72 | 72 |
73 #endif | 73 #endif |
OLD | NEW |