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

Side by Side Diff: content/browser/push_messaging/push_messaging_router.h

Issue 1579413004: Move push event dispatching out of ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Have a simplified combined StartRequest/DispatchEvent/FinishRequest method Created 4 years, 11 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 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 CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_ 5 #ifndef CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
6 #define CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_ 6 #define CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/common/service_worker/service_worker_status_code.h" 13 #include "content/common/service_worker/service_worker_status_code.h"
14 #include "content/public/common/push_messaging_status.h" 14 #include "content/public/common/push_messaging_status.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 class BrowserContext; 19 class BrowserContext;
20 class ServiceWorkerContextWrapper; 20 class ServiceWorkerContextWrapper;
21 class ServiceWorkerRegistration; 21 class ServiceWorkerRegistration;
22 class ServiceWorkerVersion;
22 23
23 class PushMessagingRouter { 24 class PushMessagingRouter {
24 public: 25 public:
25 typedef base::Callback<void(PushDeliveryStatus)> DeliverMessageCallback; 26 typedef base::Callback<void(PushDeliveryStatus)> DeliverMessageCallback;
26 27
27 // Delivers a push message with |data| to the Service Worker identified by 28 // Delivers a push message with |data| to the Service Worker identified by
28 // |origin| and |service_worker_registration_id|. Must be called on the UI 29 // |origin| and |service_worker_registration_id|. Must be called on the UI
29 // thread. 30 // thread.
30 static void DeliverMessage( 31 static void DeliverMessage(
31 BrowserContext* browser_context, 32 BrowserContext* browser_context,
(...skipping 29 matching lines...) Expand all
61 const scoped_refptr<ServiceWorkerRegistration>& 62 const scoped_refptr<ServiceWorkerRegistration>&
62 service_worker_registration, 63 service_worker_registration,
63 ServiceWorkerStatusCode service_worker_status); 64 ServiceWorkerStatusCode service_worker_status);
64 65
65 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter); 66 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter);
66 }; 67 };
67 68
68 } // namespace content 69 } // namespace content
69 70
70 #endif // CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_ 71 #endif // CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698