OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ | 5 #ifndef CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ |
6 #define CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ | 6 #define CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
12 #include "base/hash_tables.h" | 12 #include "base/hash_tables.h" |
13 #include "webkit/api/public/WebNotification.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebNotification.h" |
14 | 14 |
15 namespace WebKit { | 15 namespace WebKit { |
16 class WebNotificationPermissionCallback; | 16 class WebNotificationPermissionCallback; |
17 } | 17 } |
18 | 18 |
19 // This class manages the set of active Notification objects in either | 19 // This class manages the set of active Notification objects in either |
20 // a render or worker process. This class should be accessed only on | 20 // a render or worker process. This class should be accessed only on |
21 // the main thread. | 21 // the main thread. |
22 class ActiveNotificationTracker { | 22 class ActiveNotificationTracker { |
23 public: | 23 public: |
(...skipping 17 matching lines...) Expand all Loading... |
41 // Tracking maps for active notifications and permission requests. | 41 // Tracking maps for active notifications and permission requests. |
42 IDMap<WebKit::WebNotification> notification_table_; | 42 IDMap<WebKit::WebNotification> notification_table_; |
43 ReverseTable reverse_notification_table_; | 43 ReverseTable reverse_notification_table_; |
44 IDMap<WebKit::WebNotificationPermissionCallback> callback_table_; | 44 IDMap<WebKit::WebNotificationPermissionCallback> callback_table_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(ActiveNotificationTracker); | 46 DISALLOW_COPY_AND_ASSIGN(ActiveNotificationTracker); |
47 }; | 47 }; |
48 | 48 |
49 #endif // CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ | 49 #endif // CHROME_COMMON_DESKTOP_NOTIFICATIONS_ACTIVE_NOTIFICATION_TRACKER_H_ |
50 | 50 |
OLD | NEW |