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

Side by Side Diff: content/browser/notifications/blink_notification_service_impl.h

Issue 1995663003: Revert of Introduce the Blink NotificationService, move permission checks there (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/notifications/blink_notification_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "third_party/WebKit/public/platform/modules/notifications/notification_ service.mojom.h"
12
13 namespace content {
14
15 class PlatformNotificationContextImpl;
16 class ResourceContext;
17
18 // Implementation of the NotificationService used for Web Notifications. Is
19 // responsible for displaying, updating and reading of both non-persistent
20 // and persistent notifications. Lives on the IO thread.
21 class BlinkNotificationServiceImpl : public blink::mojom::NotificationService {
22 public:
23 BlinkNotificationServiceImpl(
24 PlatformNotificationContextImpl* notification_context,
25 ResourceContext* resource_context,
26 int render_process_id,
27 mojo::InterfaceRequest<blink::mojom::NotificationService> request);
28 ~BlinkNotificationServiceImpl() override;
29
30 // blink::mojom::NotificationService implementation.
31 void GetPermissionStatus(
32 const mojo::String& origin,
33 const GetPermissionStatusCallback& callback) override;
34
35 private:
36 // Called when an error is detected on binding_.
37 void OnConnectionError();
38
39 // The notification context that owns this service instance.
40 PlatformNotificationContextImpl* notification_context_;
41
42 ResourceContext* resource_context_;
43
44 int render_process_id_;
45
46 mojo::Binding<blink::mojom::NotificationService> binding_;
47
48 DISALLOW_COPY_AND_ASSIGN(BlinkNotificationServiceImpl);
49 };
50
51 } // namespace content
52
53 #endif // CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/notifications/blink_notification_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698