OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 blink::WebNotificationDelegate* delegate); | 42 blink::WebNotificationDelegate* delegate); |
43 virtual void showPersistent( | 43 virtual void showPersistent( |
44 const blink::WebSerializedOrigin& origin, | 44 const blink::WebSerializedOrigin& origin, |
45 const blink::WebNotificationData& notification_data, | 45 const blink::WebNotificationData& notification_data, |
46 blink::WebServiceWorkerRegistration* service_worker_registration, | 46 blink::WebServiceWorkerRegistration* service_worker_registration, |
47 blink::WebNotificationShowCallbacks* callbacks); | 47 blink::WebNotificationShowCallbacks* callbacks); |
48 virtual void close(blink::WebNotificationDelegate* delegate); | 48 virtual void close(blink::WebNotificationDelegate* delegate); |
49 virtual void closePersistent( | 49 virtual void closePersistent( |
50 const blink::WebSerializedOrigin& origin, | 50 const blink::WebSerializedOrigin& origin, |
51 const blink::WebString& persistent_notification_id); | 51 const blink::WebString& persistent_notification_id); |
52 // TODO(peter): Remove this method when Blink has been updated. | |
53 virtual void closePersistent( | |
54 const blink::WebString& persistent_notification_id); | |
55 virtual void notifyDelegateDestroyed( | 52 virtual void notifyDelegateDestroyed( |
56 blink::WebNotificationDelegate* delegate); | 53 blink::WebNotificationDelegate* delegate); |
57 virtual blink::WebNotificationPermission checkPermission( | 54 virtual blink::WebNotificationPermission checkPermission( |
58 const blink::WebSerializedOrigin& origin); | 55 const blink::WebSerializedOrigin& origin); |
59 | 56 |
60 // Called by the NotificationDispatcher. | 57 // Called by the NotificationDispatcher. |
61 bool OnMessageReceived(const IPC::Message& message); | 58 bool OnMessageReceived(const IPC::Message& message); |
62 | 59 |
63 private: | 60 private: |
64 NotificationManager( | 61 NotificationManager( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 98 |
102 // Map to store the delegate associated with a notification request Id. | 99 // Map to store the delegate associated with a notification request Id. |
103 std::map<int, blink::WebNotificationDelegate*> active_page_notifications_; | 100 std::map<int, blink::WebNotificationDelegate*> active_page_notifications_; |
104 | 101 |
105 DISALLOW_COPY_AND_ASSIGN(NotificationManager); | 102 DISALLOW_COPY_AND_ASSIGN(NotificationManager); |
106 }; | 103 }; |
107 | 104 |
108 } // namespace content | 105 } // namespace content |
109 | 106 |
110 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 107 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
OLD | NEW |