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

Side by Side Diff: content/public/browser/platform_notification_service.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 CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
6 #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
7
8 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h"
11 #include "content/public/common/show_desktop_notification_params.h"
12 #include "third_party/WebKit/public/platform/WebNotificationPermission.h"
13
14 class GURL;
15
16 namespace content {
17
18 class BrowserContext;
19 class DesktopNotificationDelegate;
20 class ResourceContext;
21
22 // The service using which notifications can be presented to the user. There
23 // should be a unique instance of the PlatformNotificationService depending
24 // on the browsing context being used.
25 class CONTENT_EXPORT PlatformNotificationService {
26 public:
27 virtual ~PlatformNotificationService() {}
28
29 // Checks if |origin| has permission to display Web Notifications. This method
30 // must be called on the IO thread.
31 virtual blink::WebNotificationPermission CheckPermission(
32 ResourceContext* resource_context,
33 const GURL& origin,
34 int render_process_id) = 0;
35
36 // Displays the notification described in |params| to the user. This method
37 // must be called on the UI thread.
38 virtual void DisplayNotification(
39 BrowserContext* browser_context,
40 const ShowDesktopNotificationHostMsgParams& params,
41 scoped_ptr<DesktopNotificationDelegate> delegate,
42 int render_process_id,
43 base::Closure* cancel_callback) = 0;
dewittj 2014/12/02 17:22:59 It's unclear that this is an outparam, can you doc
Peter Beverloo 2014/12/05 20:03:43 I've documented it in the comment. I don't think t
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698