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

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

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Methods to setup and modify permission preferences. 90 // Methods to setup and modify permission preferences.
91 void GrantPermission(const GURL& origin); 91 void GrantPermission(const GURL& origin);
92 void DenyPermission(const GURL& origin); 92 void DenyPermission(const GURL& origin);
93 93
94 // Creates a data:xxxx URL which contains the full HTML for a notification 94 // Creates a data:xxxx URL which contains the full HTML for a notification
95 // using supplied icon, title, and text, run through a template which contains 95 // using supplied icon, title, and text, run through a template which contains
96 // the standard formatting for notifications. 96 // the standard formatting for notifications.
97 static string16 CreateDataUrl(const GURL& icon_url, 97 static string16 CreateDataUrl(const GURL& icon_url,
98 const string16& title, 98 const string16& title,
99 const string16& body, 99 const string16& body,
100 WebKit::WebTextDirection dir); 100 blink::WebTextDirection dir);
101 101
102 // Creates a data:xxxx URL which contains the full HTML for a notification 102 // Creates a data:xxxx URL which contains the full HTML for a notification
103 // using resource template which contains the standard formatting for 103 // using resource template which contains the standard formatting for
104 // notifications. 104 // notifications.
105 static string16 CreateDataUrl(int resource, 105 static string16 CreateDataUrl(int resource,
106 const std::vector<std::string>& subst); 106 const std::vector<std::string>& subst);
107 107
108 // Add a desktop notification. On non-Ash platforms this will generate a HTML 108 // Add a desktop notification. On non-Ash platforms this will generate a HTML
109 // notification from the input parameters. On Ash it will generate a normal 109 // notification from the input parameters. On Ash it will generate a normal
110 // ash notification. Returns the notification id. 110 // ash notification. Returns the notification id.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 154 // Checks to see if a given origin has permission to create desktop
155 // notifications. 155 // notifications.
156 WebKit::WebNotificationPresenter::Permission 156 blink::WebNotificationPresenter::Permission
157 HasPermission(const GURL& origin); 157 HasPermission(const GURL& origin);
158 158
159 // Returns true if the notifier with |notifier_id| is allowed to send 159 // Returns true if the notifier with |notifier_id| is allowed to send
160 // notifications. 160 // notifications.
161 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); 161 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id);
162 162
163 // Updates the availability of the notifier. 163 // Updates the availability of the notifier.
164 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, 164 void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
165 bool enabled); 165 bool enabled);
166 166
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Registrar for the other kind of notifications (event signaling). 232 // Registrar for the other kind of notifications (event signaling).
233 content::NotificationRegistrar registrar_; 233 content::NotificationRegistrar registrar_;
234 234
235 // Welcome Notification 235 // Welcome Notification
236 scoped_ptr<WelcomeNotification> welcome_notification; 236 scoped_ptr<WelcomeNotification> welcome_notification;
237 237
238 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 238 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
239 }; 239 };
240 240
241 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 241 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698