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

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

Issue 561813002: Move the logic for creating data: URLs out of DesktopNotificationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/desktop_notification_service.h
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index c2397acca9d5e8834b8ce5bc6b1218e68197ad76..24e3dd6571fe4575ae2cb4b234976281ca741b01 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -65,8 +65,16 @@ class DesktopNotificationService
// Register profile-specific prefs of notifications.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs);
- DesktopNotificationService(Profile* profile,
- NotificationUIManager* ui_manager);
+ // Add a desktop notification.
+ static std::string AddIconNotification(const GURL& origin_url,
+ const base::string16& title,
+ const base::string16& message,
+ const gfx::Image& icon,
+ const base::string16& replace_id,
+ NotificationDelegate* delegate,
+ Profile* profile);
+
+ explicit DesktopNotificationService(Profile* profile);
virtual ~DesktopNotificationService();
// Requests Web Notification permission for |requesting_frame|. The |callback|
@@ -86,29 +94,6 @@ class DesktopNotificationService
scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback);
- // Creates a data:xxxx URL which contains the full HTML for a notification
- // using supplied icon, title, and text, run through a template which contains
- // the standard formatting for notifications.
- static base::string16 CreateDataUrl(const GURL& icon_url,
- const base::string16& title,
- const base::string16& body,
- blink::WebTextDirection dir);
-
- // Creates a data:xxxx URL which contains the full HTML for a notification
- // using resource template which contains the standard formatting for
- // notifications.
- static base::string16 CreateDataUrl(int resource,
- const std::vector<std::string>& subst);
-
- // Add a desktop notification.
- static std::string AddIconNotification(const GURL& origin_url,
- const base::string16& title,
- const base::string16& message,
- const gfx::Image& icon,
- const base::string16& replace_id,
- NotificationDelegate* delegate,
- Profile* profile);
-
// Returns true if the notifier with |notifier_id| is allowed to send
// notifications.
bool IsNotifierEnabled(const message_center::NotifierId& notifier_id);
@@ -127,7 +112,6 @@ class DesktopNotificationService
// from the origin itself when dealing with extensions.
base::string16 DisplayNameForOriginInProcessId(const GURL& origin,
int process_id);
- NotificationUIManager* GetUIManager();
// Called when the string list pref has been changed.
void OnStringListPrefChanged(
@@ -155,10 +139,6 @@ class DesktopNotificationService
// The profile which owns this object.
Profile* profile_;
- // Non-owned pointer to the notification manager which manages the
- // UI for desktop toasts.
- NotificationUIManager* ui_manager_;
-
// Prefs listener for disabled_extension_id.
StringListPrefMember disabled_extension_id_pref_;
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698