Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: Source/modules/notifications/NotificationClient.h

Issue 393863002: Switch Blink to the new Web Notifications permission path. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual bool show(Notification*) = 0; 56 virtual bool show(Notification*) = 0;
57 57
58 // Requests that a notification that has already been shown be closed. 58 // Requests that a notification that has already been shown be closed.
59 virtual void close(Notification*) = 0; 59 virtual void close(Notification*) = 0;
60 60
61 // Informs the presenter that a Notification object has been destroyed 61 // Informs the presenter that a Notification object has been destroyed
62 // (such as by a page transition). The presenter may continue showing 62 // (such as by a page transition). The presenter may continue showing
63 // the notification, but must not attempt to call the event handlers. 63 // the notification, but must not attempt to call the event handlers.
64 virtual void notificationObjectDestroyed(Notification*) = 0; 64 virtual void notificationObjectDestroyed(Notification*) = 0;
65 65
66 // Requests user permission to show desktop notifications from a particular
67 // script context. The callback parameter should be run when the user has
68 // made a decision.
69 virtual void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPer missionCallback>) = 0;
70
71 // Checks the current level of permission. 66 // Checks the current level of permission.
72 virtual Permission checkPermission(ExecutionContext*) = 0; 67 virtual Permission checkPermission(ExecutionContext*) = 0;
73 }; 68 };
74 69
75 } // namespace blink 70 } // namespace blink
76 71
77 #endif // NotificationClient_h 72 #endif // NotificationClient_h
OLDNEW
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/web/NotificationPermissionClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698