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_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
14 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onPermission.h" | 15 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onPermission.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 class SkBitmap; | 18 class SkBitmap; |
18 | 19 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 int64_t persistent_notification_id, | 66 int64_t persistent_notification_id, |
66 const GURL& origin, | 67 const GURL& origin, |
67 const SkBitmap& icon, | 68 const SkBitmap& icon, |
68 const PlatformNotificationData& notification_data) = 0; | 69 const PlatformNotificationData& notification_data) = 0; |
69 | 70 |
70 // Closes the persistent notification identified by | 71 // Closes the persistent notification identified by |
71 // |persistent_notification_id|. This method must be called on the UI thread. | 72 // |persistent_notification_id|. This method must be called on the UI thread. |
72 virtual void ClosePersistentNotification( | 73 virtual void ClosePersistentNotification( |
73 BrowserContext* browser_context, | 74 BrowserContext* browser_context, |
74 int64_t persistent_notification_id) = 0; | 75 int64_t persistent_notification_id) = 0; |
| 76 |
| 77 // Writes the ids of all currently displaying persistent notifications for the |
| 78 // given |browser_context| to |displayed_notifications|. Returns whether the |
| 79 // platform is able to provide such a set. |
| 80 virtual bool GetDisplayedPersistentNotifications( |
| 81 BrowserContext* browser_context, |
| 82 std::set<std::string>* displayed_notifications) = 0; |
75 }; | 83 }; |
76 | 84 |
77 } // namespace content | 85 } // namespace content |
78 | 86 |
79 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ | 87 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
OLD | NEW |