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

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

Issue 578883003: Remove the strict dependency on WebContents for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb through render_process_id Created 6 years, 2 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 unified diff | Download patch
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 18 matching lines...) Expand all
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 class RenderFrameHost;
40 struct ShowDesktopNotificationHostMsgParams; 39 struct ShowDesktopNotificationHostMsgParams;
41 } 40 }
42 41
43 #if defined(ENABLE_EXTENSIONS) 42 #if defined(ENABLE_EXTENSIONS)
44 namespace extensions { 43 namespace extensions {
45 class ExtensionRegistry; 44 class ExtensionRegistry;
46 } 45 }
47 #endif 46 #endif
48 47
49 namespace gfx { 48 namespace gfx {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 content::WebContents* web_contents, 87 content::WebContents* web_contents,
89 const PermissionRequestID& request_id, 88 const PermissionRequestID& request_id,
90 const GURL& requesting_origin, 89 const GURL& requesting_origin,
91 bool user_gesture, 90 bool user_gesture,
92 const NotificationPermissionCallback& callback); 91 const NotificationPermissionCallback& callback);
93 92
94 // Show a desktop notification. If |cancel_callback| is non-null, it's set to 93 // Show a desktop notification. If |cancel_callback| is non-null, it's set to
95 // a callback which can be used to cancel the notification. 94 // a callback which can be used to cancel the notification.
96 void ShowDesktopNotification( 95 void ShowDesktopNotification(
97 const content::ShowDesktopNotificationHostMsgParams& params, 96 const content::ShowDesktopNotificationHostMsgParams& params,
98 content::RenderFrameHost* render_frame_host, 97 int render_process_id,
99 scoped_ptr<content::DesktopNotificationDelegate> delegate, 98 scoped_ptr<content::DesktopNotificationDelegate> delegate,
100 base::Closure* cancel_callback); 99 base::Closure* cancel_callback);
101 100
102 // Returns true if the notifier with |notifier_id| is allowed to send 101 // Returns true if the notifier with |notifier_id| is allowed to send
103 // notifications. 102 // notifications.
104 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id); 103 bool IsNotifierEnabled(const message_center::NotifierId& notifier_id);
105 104
106 // Updates the availability of the notifier. 105 // Updates the availability of the notifier.
107 void SetNotifierEnabled(const message_center::NotifierId& notifier_id, 106 void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
108 bool enabled); 107 bool enabled);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 extensions::ExtensionRegistryObserver> 163 extensions::ExtensionRegistryObserver>
165 extension_registry_observer_; 164 extension_registry_observer_;
166 #endif 165 #endif
167 166
168 base::WeakPtrFactory<DesktopNotificationService> weak_factory_; 167 base::WeakPtrFactory<DesktopNotificationService> weak_factory_;
169 168
170 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 169 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
171 }; 170 };
172 171
173 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 172 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698