OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "base/memory/singleton.h" |
| 9 #include "content/public/browser/platform_notification_service.h" |
| 10 |
| 11 // The platform notification service is the profile-agnostic entry point through |
| 12 // which Web Notifications can be controlled. |
| 13 class PlatformNotificationServiceImpl |
| 14 : public content::PlatformNotificationService { |
| 15 public: |
| 16 // Returns the active instance of the service in the browser process. Safe to |
| 17 // be called from any thread. |
| 18 static PlatformNotificationServiceImpl* GetInstance(); |
| 19 |
| 20 // content::PlatformNotificationService implementation. |
| 21 blink::WebNotificationPermission CheckPermission( |
| 22 content::ResourceContext* resource_context, |
| 23 const GURL& origin, |
| 24 int render_process_id) override;; |
| 25 void DisplayNotification( |
| 26 content::BrowserContext* browser_context, |
| 27 const content::ShowDesktopNotificationHostMsgParams& params, |
| 28 scoped_ptr<content::DesktopNotificationDelegate> delegate, |
| 29 int render_process_id, |
| 30 base::Closure* cancel_callback) override; |
| 31 |
| 32 private: |
| 33 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; |
| 34 |
| 35 PlatformNotificationServiceImpl(); |
| 36 ~PlatformNotificationServiceImpl() override; |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ |
OLD | NEW |