Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / notifications / desktop_notification_service.h
index d68e965..5e172b8 100644 (file)
@@ -36,7 +36,6 @@ class Profile;
 
 namespace content {
 class DesktopNotificationDelegate;
-class RenderFrameHost;
 struct ShowDesktopNotificationHostMsgParams;
 }
 
@@ -54,10 +53,6 @@ namespace user_prefs {
 class PrefRegistrySyncable;
 }
 
-// Callback to be invoked when the result of a permission request is known.
-typedef base::Callback<void(blink::WebNotificationPermission)>
-    NotificationPermissionCallback;
-
 // The DesktopNotificationService is an object, owned by the Profile,
 // which provides the creation of desktop "toasts" to web pages and workers.
 class DesktopNotificationService : public PermissionContextBase
@@ -80,22 +75,22 @@ class DesktopNotificationService : public PermissionContextBase
                                          Profile* profile);
 
   explicit DesktopNotificationService(Profile* profile);
-  virtual ~DesktopNotificationService();
+  ~DesktopNotificationService() override;
 
   // Requests Web Notification permission for |requesting_frame|. The |callback|
   // will be invoked after the user has made a decision.
   void RequestNotificationPermission(
       content::WebContents* web_contents,
       const PermissionRequestID& request_id,
-      const GURL& requesting_frame,
+      const GURL& requesting_origin,
       bool user_gesture,
-      const NotificationPermissionCallback& callback);
+      const base::Callback<void(bool)>& result_callback);
 
   // Show a desktop notification. If |cancel_callback| is non-null, it's set to
   // a callback which can be used to cancel the notification.
   void ShowDesktopNotification(
       const content::ShowDesktopNotificationHostMsgParams& params,
-      content::RenderFrameHost* render_frame_host,
+      int render_process_id,
       scoped_ptr<content::DesktopNotificationDelegate> delegate,
       base::Closure* cancel_callback);
 
@@ -121,28 +116,21 @@ class DesktopNotificationService : public PermissionContextBase
   // Called when the disabled_extension_id pref has been changed.
   void OnDisabledExtensionIdsChanged();
 
-  // Used as a callback once a permission has been decided to convert |allowed|
-  // to one of the blink::WebNotificationPermission values.
-  void OnNotificationPermissionRequested(
-      const base::Callback<void(blink::WebNotificationPermission)>& callback,
-      bool allowed);
-
   void FirePermissionLevelChangedEvent(
       const message_center::NotifierId& notifier_id,
       bool enabled);
 
 #if defined(ENABLE_EXTENSIONS)
   // extensions::ExtensionRegistryObserver:
-  virtual void OnExtensionUninstalled(
-      content::BrowserContext* browser_context,
-      const extensions::Extension* extension,
-      extensions::UninstallReason reason) OVERRIDE;
+  void OnExtensionUninstalled(content::BrowserContext* browser_context,
+                              const extensions::Extension* extension,
+                              extensions::UninstallReason reason) override;
 #endif
 
   // PermissionContextBase:
-  virtual void UpdateContentSetting(const GURL& requesting_origin,
-                                    const GURL& embedder_origin,
-                                    bool allowed) OVERRIDE;
+  void UpdateContentSetting(const GURL& requesting_origin,
+                            const GURL& embedder_origin,
+                            bool allowed) override;
 
   // The profile which owns this object.
   Profile* profile_;
@@ -166,8 +154,6 @@ class DesktopNotificationService : public PermissionContextBase
       extension_registry_observer_;
 #endif
 
-  base::WeakPtrFactory<DesktopNotificationService> weak_factory_;
-
   DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
 };