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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 61323002: Fix broken threading model in CheckDesktopNotificationPermission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more merge conflicts.. Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void GetNotificationsSettings(ContentSettingsForOneType* settings); 144 void GetNotificationsSettings(ContentSettingsForOneType* settings);
145 145
146 // Clears the notifications setting for the given pattern. 146 // Clears the notifications setting for the given pattern.
147 void ClearSetting(const ContentSettingsPattern& pattern); 147 void ClearSetting(const ContentSettingsPattern& pattern);
148 148
149 // Clears the sets of explicitly allowed and denied origins. 149 // Clears the sets of explicitly allowed and denied origins.
150 void ResetAllOrigins(); 150 void ResetAllOrigins();
151 151
152 ContentSetting GetContentSetting(const GURL& origin); 152 ContentSetting GetContentSetting(const GURL& origin);
153 153
154 // Checks to see if a given origin has permission to create desktop
155 // notifications.
156 blink::WebNotificationPresenter::Permission
157 HasPermission(const GURL& origin);
158
159 // Returns true if the notifier with |notifier_id| is allowed to send 154 // Returns true if the notifier with |notifier_id| is allowed to send
160 // notifications. 155 // notifications.
161 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); 156 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id);
162 157
163 // Updates the availability of the notifier. 158 // Updates the availability of the notifier.
164 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, 159 void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
165 bool enabled); 160 bool enabled);
166 161
167 // Adds in a the welcome notification if required for components built 162 // Adds in a the welcome notification if required for components built
168 // into Chrome that show notifications like Chrome Now. 163 // into Chrome that show notifications like Chrome Now.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Registrar for the other kind of notifications (event signaling). 227 // Registrar for the other kind of notifications (event signaling).
233 content::NotificationRegistrar registrar_; 228 content::NotificationRegistrar registrar_;
234 229
235 // Welcome Notification 230 // Welcome Notification
236 scoped_ptr<WelcomeNotification> welcome_notification; 231 scoped_ptr<WelcomeNotification> welcome_notification;
237 232
238 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 233 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
239 }; 234 };
240 235
241 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 236 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698