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

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

Issue 2183783002: Revert of Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const DeliverMessageCallback& deliver_message_callback, 47 const DeliverMessageCallback& deliver_message_callback,
48 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context); 48 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
49 49
50 // If a registration was successfully retrieved, dispatches a push event with 50 // If a registration was successfully retrieved, dispatches a push event with
51 // |data| on the Service Worker identified by |service_worker_registration|. 51 // |data| on the Service Worker identified by |service_worker_registration|.
52 // Must be called on the IO thread. 52 // Must be called on the IO thread.
53 static void FindServiceWorkerRegistrationCallback( 53 static void FindServiceWorkerRegistrationCallback(
54 const PushEventPayload& payload, 54 const PushEventPayload& payload,
55 const DeliverMessageCallback& deliver_message_callback, 55 const DeliverMessageCallback& deliver_message_callback,
56 ServiceWorkerStatusCode service_worker_status, 56 ServiceWorkerStatusCode service_worker_status,
57 scoped_refptr<ServiceWorkerRegistration> service_worker_registration); 57 const scoped_refptr<ServiceWorkerRegistration>&
58 service_worker_registration);
58 59
59 // Delivers a push message with |data| to a specific |service_worker|. Must be 60 // Delivers a push message with |data| to a specific |service_worker|. Must be
60 // called on the IO thread, with the the worker running. 61 // called on the IO thread, with the the worker running.
61 static void DeliverMessageToWorker( 62 static void DeliverMessageToWorker(
62 const scoped_refptr<ServiceWorkerVersion>& service_worker, 63 const scoped_refptr<ServiceWorkerVersion>& service_worker,
63 const scoped_refptr<ServiceWorkerRegistration>& 64 const scoped_refptr<ServiceWorkerRegistration>&
64 service_worker_registration, 65 service_worker_registration,
65 const PushEventPayload& payload, 66 const PushEventPayload& payload,
66 const DeliverMessageCallback& deliver_message_callback); 67 const DeliverMessageCallback& deliver_message_callback);
67 68
68 // Gets called asynchronously after the Service Worker has dispatched the push 69 // Gets called asynchronously after the Service Worker has dispatched the push
69 // event. Must be called on the IO thread. 70 // event. Must be called on the IO thread.
70 static void DeliverMessageEnd( 71 static void DeliverMessageEnd(
71 const DeliverMessageCallback& deliver_message_callback, 72 const DeliverMessageCallback& deliver_message_callback,
72 const scoped_refptr<ServiceWorkerRegistration>& 73 const scoped_refptr<ServiceWorkerRegistration>&
73 service_worker_registration, 74 service_worker_registration,
74 ServiceWorkerStatusCode service_worker_status); 75 ServiceWorkerStatusCode service_worker_status);
75 76
76 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter);
77 }; 78 };
78 79
79 } // namespace content 80 } // namespace content
80 81
81 #endif // CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_ 82 #endif // CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
OLDNEW
« no previous file with comments | « content/browser/notifications/notification_message_filter.cc ('k') | content/browser/push_messaging/push_messaging_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698