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

Unified Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 7053041: Add a Create method to DesktopNotificationHandler and stubs for the notification objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to fix trybot failures and address torne's comments. Created 9 years, 7 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/desktop_notification_service.cc
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 205afb617c293a044ef06e7aabddbd26d1bf439e..fa4d1a8ebe31f365550023a67305bac236b2cecc 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -591,3 +591,22 @@ void DesktopNotificationService::NotifySettingsChange() {
Source<DesktopNotificationService>(this),
NotificationService::NoDetails());
}
+
+void DesktopNotificationService::ShowBalloon(GURL origin_url,
+ GURL icon_url,
+ const string16& title,
+ const string16& message,
+ NotificationDelegate* delegate,
+ Profile* profile) {
+ string16 content_url = CreateDataUrl(icon_url, title, message,
+ WebKit::WebTextDirectionDefault);
+ Notification notification(origin_url, GURL(content_url), string16(),
+ string16(), delegate);
+ g_browser_process->notification_ui_manager()->Add(notification, profile);
+}
+
+int DesktopNotificationService::HasPermission(Profile* profile,
+ const GURL& origin) {
+ return DesktopNotificationServiceFactory::GetForProfile(profile)->
+ prefs_cache()->HasPermission(origin.GetOrigin());
+}

Powered by Google App Engine
This is Rietveld 408576698