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

Side by Side Diff: content/browser/notifications/notification_message_filter.h

Issue 2916383004: Revert of Minimize the delegate dependencies for non persistent notifications. (Closed)
Patch Set: Created 3 years, 6 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_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_ 6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // cases where the renderer shouldn't send messages if it weren't the case. If 129 // cases where the renderer shouldn't send messages if it weren't the case. If
130 // no permission has been granted, a bad message has been received and the 130 // no permission has been granted, a bad message has been received and the
131 // renderer should be killed accordingly. 131 // renderer should be killed accordingly.
132 bool VerifyNotificationPermissionGranted(PlatformNotificationService* service, 132 bool VerifyNotificationPermissionGranted(PlatformNotificationService* service,
133 const GURL& origin); 133 const GURL& origin);
134 134
135 // Returns the NotificationIdGenerator instance owned by the context. 135 // Returns the NotificationIdGenerator instance owned by the context.
136 NotificationIdGenerator* GetNotificationIdGenerator() const; 136 NotificationIdGenerator* GetNotificationIdGenerator() const;
137 137
138 int process_id_; 138 int process_id_;
139 bool non_persistent__notification_shown_;
140 scoped_refptr<PlatformNotificationContextImpl> notification_context_; 139 scoped_refptr<PlatformNotificationContextImpl> notification_context_;
141 ResourceContext* resource_context_; 140 ResourceContext* resource_context_;
142 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 141 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
143 BrowserContext* browser_context_; 142 BrowserContext* browser_context_;
144 143
145 // Map mapping notification IDs associated with non-persistent notifications 144 // Map mapping notification IDs associated with non-persistent notifications
146 // to the closures that may be used for programmatically closing them. 145 // to the closures that may be used for programmatically closing them.
147 std::unordered_map<std::string, base::Closure> close_closures_; 146 std::unordered_map<std::string, base::Closure> close_closures_;
148 147
149 base::WeakPtrFactory<NotificationMessageFilter> weak_factory_io_; 148 base::WeakPtrFactory<NotificationMessageFilter> weak_factory_io_;
150 149
151 DISALLOW_COPY_AND_ASSIGN(NotificationMessageFilter); 150 DISALLOW_COPY_AND_ASSIGN(NotificationMessageFilter);
152 }; 151 };
153 152
154 } // namespace content 153 } // namespace content
155 154
156 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_ 155 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698