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

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
Index: chrome/browser/notifications/notification.h
diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h
index 6c7b9f205e8b09ecbeb0df1e53fd5e96d71bb63e..4d22ee3b759b150643ecaac0c49af6aa2e844ee3 100644
--- a/chrome/browser/notifications/notification.h
+++ b/chrome/browser/notifications/notification.h
@@ -43,6 +43,9 @@ 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& scope_url() const { return scope_url_; }
+ void set_scope_url(const GURL& scope_url) { scope_url_ = scope_url; }
+
// Id of the delegate embedded inside this instance.
std::string delegate_id() const { return delegate()->id(); }
@@ -52,6 +55,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.
+ GURL scope_url_;
+
// A proxy object that allows access back to the JavaScript object that
// represents the notification, for firing events.
scoped_refptr<NotificationDelegate> delegate_;

Powered by Google App Engine
This is Rietveld 408576698