| OLD | NEW |
| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 const PermissionRequestID& request_id, | 76 const PermissionRequestID& request_id, |
| 77 const GURL& requesting_frame, | 77 const GURL& requesting_frame, |
| 78 bool user_gesture, | 78 bool user_gesture, |
| 79 const NotificationPermissionCallback& callback); | 79 const NotificationPermissionCallback& callback); |
| 80 | 80 |
| 81 // Show a desktop notification. If |cancel_callback| is non-null, it's set to | 81 // Show a desktop notification. If |cancel_callback| is non-null, it's set to |
| 82 // a callback which can be used to cancel the notification. | 82 // a callback which can be used to cancel the notification. |
| 83 void ShowDesktopNotification( | 83 void ShowDesktopNotification( |
| 84 const content::ShowDesktopNotificationHostMsgParams& params, | 84 const content::ShowDesktopNotificationHostMsgParams& params, |
| 85 content::RenderFrameHost* render_frame_host, | 85 content::RenderFrameHost* render_frame_host, |
| 86 content::DesktopNotificationDelegate* delegate, | 86 scoped_ptr<content::DesktopNotificationDelegate> delegate, |
| 87 base::Closure* cancel_callback); | 87 base::Closure* cancel_callback); |
| 88 | 88 |
| 89 // Creates a data:xxxx URL which contains the full HTML for a notification | 89 // Creates a data:xxxx URL which contains the full HTML for a notification |
| 90 // using supplied icon, title, and text, run through a template which contains | 90 // using supplied icon, title, and text, run through a template which contains |
| 91 // the standard formatting for notifications. | 91 // the standard formatting for notifications. |
| 92 static base::string16 CreateDataUrl(const GURL& icon_url, | 92 static base::string16 CreateDataUrl(const GURL& icon_url, |
| 93 const base::string16& title, | 93 const base::string16& title, |
| 94 const base::string16& body, | 94 const base::string16& body, |
| 95 blink::WebTextDirection dir); | 95 blink::WebTextDirection dir); |
| 96 | 96 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 // Welcome Notification | 179 // Welcome Notification |
| 180 scoped_ptr<ExtensionWelcomeNotification> chrome_now_welcome_notification_; | 180 scoped_ptr<ExtensionWelcomeNotification> chrome_now_welcome_notification_; |
| 181 | 181 |
| 182 base::WeakPtrFactory<DesktopNotificationService> weak_factory_; | 182 base::WeakPtrFactory<DesktopNotificationService> weak_factory_; |
| 183 | 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 184 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 187 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
| OLD | NEW |