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

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

Issue 794633002: Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 2014 The Chromium Authors. All rights reserved. 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 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_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "content/public/browser/platform_notification_service.h" 9 #include "content/public/browser/platform_notification_service.h"
10 10
11 // The platform notification service is the profile-agnostic entry point through 11 // The platform notification service is the profile-agnostic entry point through
12 // which Web Notifications can be controlled. 12 // which Web Notifications can be controlled.
13 class PlatformNotificationServiceImpl 13 class PlatformNotificationServiceImpl
14 : public content::PlatformNotificationService { 14 : public content::PlatformNotificationService {
15 public: 15 public:
16 // Returns the active instance of the service in the browser process. Safe to 16 // Returns the active instance of the service in the browser process. Safe to
17 // be called from any thread. 17 // be called from any thread.
18 static PlatformNotificationServiceImpl* GetInstance(); 18 static PlatformNotificationServiceImpl* GetInstance();
19 19
20 // content::PlatformNotificationService implementation. 20 // content::PlatformNotificationService implementation.
21 blink::WebNotificationPermission CheckPermission( 21 blink::WebNotificationPermission CheckPermission(
22 content::ResourceContext* resource_context, 22 content::ResourceContext* resource_context,
23 const GURL& origin, 23 const GURL& origin,
24 int render_process_id) override;; 24 int render_process_id) override;
25 void DisplayNotification( 25 void DisplayNotification(
26 content::BrowserContext* browser_context, 26 content::BrowserContext* browser_context,
27 const content::ShowDesktopNotificationHostMsgParams& params, 27 const GURL& origin,
28 const SkBitmap& icon,
29 const content::PlatformNotificationData& notification_data,
28 scoped_ptr<content::DesktopNotificationDelegate> delegate, 30 scoped_ptr<content::DesktopNotificationDelegate> delegate,
29 int render_process_id, 31 int render_process_id,
30 base::Closure* cancel_callback) override; 32 base::Closure* cancel_callback) override;
31 void DisplayPersistentNotification( 33 void DisplayPersistentNotification(
32 content::BrowserContext* browser_context, 34 content::BrowserContext* browser_context,
33 int64 service_worker_registration_id, 35 int64 service_worker_registration_id,
34 const content::ShowDesktopNotificationHostMsgParams& params, 36 const GURL& origin,
37 const SkBitmap& icon,
38 const content::PlatformNotificationData& notification_data,
35 int render_process_id) override; 39 int render_process_id) override;
36 void ClosePersistentNotification( 40 void ClosePersistentNotification(
37 content::BrowserContext* browser_context, 41 content::BrowserContext* browser_context,
38 const std::string& persistent_notification_id) override; 42 const std::string& persistent_notification_id) override;
39 43
40 private: 44 private:
41 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>; 45 friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>;
42 46
43 PlatformNotificationServiceImpl(); 47 PlatformNotificationServiceImpl();
44 ~PlatformNotificationServiceImpl() override; 48 ~PlatformNotificationServiceImpl() override;
45 }; 49 };
46 50
47 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 51 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698