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

Side by Side Diff: content/public/browser/platform_notification_service.h

Issue 2151993002: [WebAPKs] Plumb service worker scope to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into notification_scope Created 4 years, 5 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
OLDNEW
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 9
10 #include <memory> 10 #include <memory>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const PlatformNotificationData& notification_data, 59 const PlatformNotificationData& notification_data,
60 const NotificationResources& notification_resources, 60 const NotificationResources& notification_resources,
61 std::unique_ptr<DesktopNotificationDelegate> delegate, 61 std::unique_ptr<DesktopNotificationDelegate> delegate,
62 base::Closure* cancel_callback) = 0; 62 base::Closure* cancel_callback) = 0;
63 63
64 // Displays the persistent notification described in |notification_data| to 64 // Displays the persistent notification described in |notification_data| to
65 // the user. This method must be called on the UI thread. 65 // the user. This method must be called on the UI thread.
66 virtual void DisplayPersistentNotification( 66 virtual void DisplayPersistentNotification(
67 BrowserContext* browser_context, 67 BrowserContext* browser_context,
68 int64_t persistent_notification_id, 68 int64_t persistent_notification_id,
69 const GURL& service_worker_origin,
69 const GURL& origin, 70 const GURL& origin,
70 const PlatformNotificationData& notification_data, 71 const PlatformNotificationData& notification_data,
71 const NotificationResources& notification_resources) = 0; 72 const NotificationResources& notification_resources) = 0;
72 73
73 // Closes the persistent notification identified by 74 // Closes the persistent notification identified by
74 // |persistent_notification_id|. This method must be called on the UI thread. 75 // |persistent_notification_id|. This method must be called on the UI thread.
75 virtual void ClosePersistentNotification( 76 virtual void ClosePersistentNotification(
76 BrowserContext* browser_context, 77 BrowserContext* browser_context,
77 int64_t persistent_notification_id) = 0; 78 int64_t persistent_notification_id) = 0;
78 79
79 // Writes the ids of all currently displaying persistent notifications for the 80 // Writes the ids of all currently displaying persistent notifications for the
80 // given |browser_context| to |displayed_notifications|. Returns whether the 81 // given |browser_context| to |displayed_notifications|. Returns whether the
81 // platform is able to provide such a set. 82 // platform is able to provide such a set.
82 virtual bool GetDisplayedPersistentNotifications( 83 virtual bool GetDisplayedPersistentNotifications(
83 BrowserContext* browser_context, 84 BrowserContext* browser_context,
84 std::set<std::string>* displayed_notifications) = 0; 85 std::set<std::string>* displayed_notifications) = 0;
85 }; 86 };
86 87
87 } // namespace content 88 } // namespace content
88 89
89 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ 90 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698