| 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 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Called by the NotificationDispatcher. | 45 // Called by the NotificationDispatcher. |
| 46 bool OnMessageReceived(const IPC::Message& message); | 46 bool OnMessageReceived(const IPC::Message& message); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 NotificationManager( | 49 NotificationManager( |
| 50 ThreadSafeSender* thread_safe_sender, | 50 ThreadSafeSender* thread_safe_sender, |
| 51 NotificationDispatcher* notification_dispatcher); | 51 NotificationDispatcher* notification_dispatcher); |
| 52 | 52 |
| 53 // IPC message handlers. | 53 // IPC message handlers. |
| 54 void OnShow(int id); | 54 void OnShow(int id); |
| 55 void OnError(int id); | |
| 56 void OnClose(int id); | 55 void OnClose(int id); |
| 57 void OnClick(int id); | 56 void OnClick(int id); |
| 58 | 57 |
| 59 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 58 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 60 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 59 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 61 | 60 |
| 62 // Map to store the delegate associated with a notification request Id. | 61 // Map to store the delegate associated with a notification request Id. |
| 63 std::map<int, blink::WebNotificationDelegate*> active_notifications_; | 62 std::map<int, blink::WebNotificationDelegate*> active_notifications_; |
| 64 | 63 |
| 65 DISALLOW_COPY_AND_ASSIGN(NotificationManager); | 64 DISALLOW_COPY_AND_ASSIGN(NotificationManager); |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 } // namespace content | 67 } // namespace content |
| 69 | 68 |
| 70 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 69 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |