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

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

Issue 774573003: Start pulling away notification logic from ChromeContentBrowserClient. (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
(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_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/notifications/platform_notification_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698