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

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

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: resolves the promise Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "content/browser/service_worker/service_worker_context_observer.h" 17 #include "content/browser/service_worker/service_worker_context_observer.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/platform_notification_context.h" 20 #include "content/public/browser/platform_notification_context.h"
21 #include "third_party/WebKit/public/platform/modules/notifications/notification_ service.mojom.h"
21 22
22 class GURL; 23 class GURL;
23 24
24 namespace base { 25 namespace base {
25 class SequencedTaskRunner; 26 class SequencedTaskRunner;
26 } 27 }
27 28
28 namespace content { 29 namespace content {
29 30
30 class BrowserContext; 31 class BrowserContext;
(...skipping 16 matching lines...) Expand all
47 const base::FilePath& path, 48 const base::FilePath& path,
48 BrowserContext* browser_context, 49 BrowserContext* browser_context,
49 const scoped_refptr<ServiceWorkerContextWrapper>& service_worker_context); 50 const scoped_refptr<ServiceWorkerContextWrapper>& service_worker_context);
50 51
51 // To be called on the UI thread to initialize the instance. 52 // To be called on the UI thread to initialize the instance.
52 void Initialize(); 53 void Initialize();
53 54
54 // To be called on the UI thread when the context is being shut down. 55 // To be called on the UI thread when the context is being shut down.
55 void Shutdown(); 56 void Shutdown();
56 57
58 // Creates a BlinkNotificationServiceImpl that is owned by this context. Will
59 // be called on the UI thread when an interface request is received.
60 void CreateService(
61 mojo::InterfaceRequest<blink::mojom::NotificationService> request);
62
63 // Returns the associated browser context.
64 BrowserContext* browser_context() const { return browser_context_; }
65
57 // PlatformNotificationContext implementation. 66 // PlatformNotificationContext implementation.
58 void ReadNotificationData(int64_t notification_id, 67 void ReadNotificationData(int64_t notification_id,
59 const GURL& origin, 68 const GURL& origin,
60 const ReadResultCallback& callback) override; 69 const ReadResultCallback& callback) override;
61 void WriteNotificationData(const GURL& origin, 70 void WriteNotificationData(const GURL& origin,
62 const NotificationDatabaseData& database_data, 71 const NotificationDatabaseData& database_data,
63 const WriteResultCallback& callback) override; 72 const WriteResultCallback& callback) override;
64 void DeleteNotificationData(int64_t notification_id, 73 void DeleteNotificationData(int64_t notification_id,
65 const GURL& origin, 74 const GURL& origin,
66 const DeleteResultCallback& callback) override; 75 const DeleteResultCallback& callback) override;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 161
153 // Indicates whether the database should be pruned when it's opened. 162 // Indicates whether the database should be pruned when it's opened.
154 bool prune_database_on_open_ = false; 163 bool prune_database_on_open_ = false;
155 164
156 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationContextImpl); 165 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationContextImpl);
157 }; 166 };
158 167
159 } // namespace content 168 } // namespace content
160 169
161 #endif // CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 170 #endif // CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698