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

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

Issue 660293002: Refactor extension code for notification permission handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 Profile* profile); 80 Profile* profile);
81 81
82 explicit DesktopNotificationService(Profile* profile); 82 explicit DesktopNotificationService(Profile* profile);
83 virtual ~DesktopNotificationService(); 83 virtual ~DesktopNotificationService();
84 84
85 // Requests Web Notification permission for |requesting_frame|. The |callback| 85 // Requests Web Notification permission for |requesting_frame|. The |callback|
86 // will be invoked after the user has made a decision. 86 // will be invoked after the user has made a decision.
87 void RequestNotificationPermission( 87 void RequestNotificationPermission(
88 content::WebContents* web_contents, 88 content::WebContents* web_contents,
89 const PermissionRequestID& request_id, 89 const PermissionRequestID& request_id,
90 const GURL& requesting_frame, 90 const GURL& requesting_origin,
91 bool user_gesture, 91 bool user_gesture,
92 const NotificationPermissionCallback& callback); 92 const NotificationPermissionCallback& callback);
93 93
94 // Show a desktop notification. If |cancel_callback| is non-null, it's set to 94 // 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. 95 // a callback which can be used to cancel the notification.
96 void ShowDesktopNotification( 96 void ShowDesktopNotification(
97 const content::ShowDesktopNotificationHostMsgParams& params, 97 const content::ShowDesktopNotificationHostMsgParams& params,
98 content::RenderFrameHost* render_frame_host, 98 content::RenderFrameHost* render_frame_host,
99 scoped_ptr<content::DesktopNotificationDelegate> delegate, 99 scoped_ptr<content::DesktopNotificationDelegate> delegate,
100 base::Closure* cancel_callback); 100 base::Closure* cancel_callback);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 extensions::ExtensionRegistryObserver> 165 extensions::ExtensionRegistryObserver>
166 extension_registry_observer_; 166 extension_registry_observer_;
167 #endif 167 #endif
168 168
169 base::WeakPtrFactory<DesktopNotificationService> weak_factory_; 169 base::WeakPtrFactory<DesktopNotificationService> weak_factory_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 171 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
172 }; 172 };
173 173
174 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 174 #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