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

Unified Diff: chrome/browser/notifications/notification.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/notification.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification.h
diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h
index 6c7b9f205e8b09ecbeb0df1e53fd5e96d71bb63e..c5c44ca5e7d57b4fab13b3c13e8ec89e69cbd962 100644
--- a/chrome/browser/notifications/notification.h
+++ b/chrome/browser/notifications/notification.h
@@ -43,6 +43,11 @@ class Notification : public message_center::Notification {
// A unique identifier used to update (replace) or remove a notification.
const std::string& tag() const { return tag_; }
+ const GURL& service_worker_scope() const { return service_worker_scope_; }
+ void set_service_worker_scope(const GURL& service_worker_scope) {
+ service_worker_scope_ = service_worker_scope;
+ }
+
// Id of the delegate embedded inside this instance.
std::string delegate_id() const { return delegate()->id(); }
@@ -52,6 +57,10 @@ class Notification : public message_center::Notification {
// The user-supplied tag for the notification.
std::string tag_;
+ // The service worker scope if the notification was displayed by a service
+ // worker. Used by WebAPKs.
+ GURL service_worker_scope_;
+
// A proxy object that allows access back to the JavaScript object that
// represents the notification, for firing events.
scoped_refptr<NotificationDelegate> delegate_;
« no previous file with comments | « no previous file | chrome/browser/notifications/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698