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

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

Issue 661643002: Adds a context message of the security origin for web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 11 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 (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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // will be invoked after the user has made a decision. 58 // will be invoked after the user has made a decision.
59 void RequestNotificationPermission( 59 void RequestNotificationPermission(
60 content::WebContents* web_contents, 60 content::WebContents* web_contents,
61 const PermissionRequestID& request_id, 61 const PermissionRequestID& request_id,
62 const GURL& requesting_origin, 62 const GURL& requesting_origin,
63 bool user_gesture, 63 bool user_gesture,
64 const base::Callback<void(bool)>& result_callback); 64 const base::Callback<void(bool)>& result_callback);
65 65
66 // Returns true if the notifier with |notifier_id| is allowed to send 66 // Returns true if the notifier with |notifier_id| is allowed to send
67 // notifications. 67 // notifications.
68 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); 68 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id) const;
69 69
70 // Updates the availability of the notifier. 70 // Updates the availability of the notifier.
71 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, 71 void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
72 bool enabled); 72 bool enabled);
73 73
74 private: 74 private:
75 // Called when the string list pref has been changed. 75 // Called when the string list pref has been changed.
76 void OnStringListPrefChanged( 76 void OnStringListPrefChanged(
77 const char* pref_name, std::set<std::string>* ids_field); 77 const char* pref_name, std::set<std::string>* ids_field);
78 78
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // An observer to listen when extension is uninstalled. 114 // An observer to listen when extension is uninstalled.
115 ScopedObserver<extensions::ExtensionRegistry, 115 ScopedObserver<extensions::ExtensionRegistry,
116 extensions::ExtensionRegistryObserver> 116 extensions::ExtensionRegistryObserver>
117 extension_registry_observer_; 117 extension_registry_observer_;
118 #endif 118 #endif
119 119
120 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 120 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
121 }; 121 };
122 122
123 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 123 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698