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 18 matching lines...) Expand all Loading... | |
29 #include "extensions/browser/extension_registry_observer.h" | 29 #include "extensions/browser/extension_registry_observer.h" |
30 #endif | 30 #endif |
31 | 31 |
32 class Notification; | 32 class Notification; |
33 class NotificationDelegate; | 33 class NotificationDelegate; |
34 class NotificationUIManager; | 34 class NotificationUIManager; |
35 class Profile; | 35 class Profile; |
36 | 36 |
37 namespace content { | 37 namespace content { |
38 class DesktopNotificationDelegate; | 38 class DesktopNotificationDelegate; |
39 struct ShowDesktopNotificationHostMsgParams; | 39 struct PlatformNotificationData; |
40 } | 40 } |
41 | 41 |
42 #if defined(ENABLE_EXTENSIONS) | 42 #if defined(ENABLE_EXTENSIONS) |
43 namespace extensions { | 43 namespace extensions { |
44 class ExtensionRegistry; | 44 class ExtensionRegistry; |
45 } | 45 } |
46 #endif | 46 #endif |
47 | 47 |
48 namespace gfx { | 48 namespace gfx { |
49 class Image; | 49 class Image; |
(...skipping 23 matching lines...) Expand all Loading... | |
73 void RequestNotificationPermission( | 73 void RequestNotificationPermission( |
74 content::WebContents* web_contents, | 74 content::WebContents* web_contents, |
75 const PermissionRequestID& request_id, | 75 const PermissionRequestID& request_id, |
76 const GURL& requesting_origin, | 76 const GURL& requesting_origin, |
77 bool user_gesture, | 77 bool user_gesture, |
78 const base::Callback<void(bool)>& result_callback); | 78 const base::Callback<void(bool)>& result_callback); |
79 | 79 |
80 // Show a desktop notification. If |cancel_callback| is non-null, it's set to | 80 // Show a desktop notification. If |cancel_callback| is non-null, it's set to |
81 // a callback which can be used to cancel the notification. | 81 // a callback which can be used to cancel the notification. |
82 void ShowDesktopNotification( | 82 void ShowDesktopNotification( |
83 const content::ShowDesktopNotificationHostMsgParams& params, | 83 const GURL& origin, |
84 const SkBitmap& icon, | |
dewittj
2014/12/10 21:57:49
Is it possible to use gfx::Image in this API so th
Peter Beverloo
2014/12/10 22:06:37
Firstly, this call is going away entirely after ht
| |
85 const content::PlatformNotificationData& notification_data, | |
84 int render_process_id, | 86 int render_process_id, |
85 scoped_ptr<content::DesktopNotificationDelegate> delegate, | 87 scoped_ptr<content::DesktopNotificationDelegate> delegate, |
86 base::Closure* cancel_callback); | 88 base::Closure* cancel_callback); |
87 | 89 |
88 // Returns true if the notifier with |notifier_id| is allowed to send | 90 // Returns true if the notifier with |notifier_id| is allowed to send |
89 // notifications. | 91 // notifications. |
90 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); | 92 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); |
91 | 93 |
92 // Updates the availability of the notifier. | 94 // Updates the availability of the notifier. |
93 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, | 95 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 // An observer to listen when extension is uninstalled. | 144 // An observer to listen when extension is uninstalled. |
143 ScopedObserver<extensions::ExtensionRegistry, | 145 ScopedObserver<extensions::ExtensionRegistry, |
144 extensions::ExtensionRegistryObserver> | 146 extensions::ExtensionRegistryObserver> |
145 extension_registry_observer_; | 147 extension_registry_observer_; |
146 #endif | 148 #endif |
147 | 149 |
148 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); | 150 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); |
149 }; | 151 }; |
150 | 152 |
151 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ | 153 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ |
OLD | NEW |