Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_ROUTER_H_ | 5 #ifndef CONTENT_BROWSER_PUSH_MESSAGING_ROUTER_H_ |
| 6 #define CONTENT_BROWSER_PUSH_MESSAGING_ROUTER_H_ | 6 #define CONTENT_BROWSER_PUSH_MESSAGING_ROUTER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/common/service_worker/service_worker_status_code.h" | 10 #include "content/common/service_worker/service_worker_status_code.h" |
| 11 #include "content/public/common/push_messaging_status.h" | 11 #include "content/public/common/push_messaging_status.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 class ServiceWorkerContextWrapper; | 17 class ServiceWorkerContextWrapper; |
| 18 class ServiceWorkerRegistration; | 18 class ServiceWorkerRegistration; |
| 19 | 19 |
| 20 class PushMessagingRouter { | 20 class PushMessagingRouter { |
| 21 public: | 21 public: |
| 22 typedef base::Callback<void(PushMessagingStatus /* push_messaging_status */)> | 22 typedef base::Callback<void(PushDeliveryStatus /* push_messaging_status */)> |
|
Michael van Ouwerkerk
2014/10/17 12:34:13
Update the comment as well.
johnme
2014/10/17 13:53:38
Removed it, as it wasn't adding anything.
| |
| 23 DeliverMessageCallback; | 23 DeliverMessageCallback; |
| 24 | 24 |
| 25 // Delivers a push message with |data| to the Service Worker identified by | 25 // Delivers a push message with |data| to the Service Worker identified by |
| 26 // |origin| and |service_worker_registration_id|. Must be called on the UI | 26 // |origin| and |service_worker_registration_id|. Must be called on the UI |
| 27 // thread. | 27 // thread. |
| 28 static void DeliverMessage( | 28 static void DeliverMessage( |
| 29 BrowserContext* browser_context, | 29 BrowserContext* browser_context, |
| 30 const GURL& origin, | 30 const GURL& origin, |
| 31 int64 service_worker_registration_id, | 31 int64 service_worker_registration_id, |
| 32 const std::string& data, | 32 const std::string& data, |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 59 const scoped_refptr<ServiceWorkerRegistration>& | 59 const scoped_refptr<ServiceWorkerRegistration>& |
| 60 service_worker_registration, | 60 service_worker_registration, |
| 61 ServiceWorkerStatusCode service_worker_status); | 61 ServiceWorkerStatusCode service_worker_status); |
| 62 | 62 |
| 63 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter); | 63 DISALLOW_IMPLICIT_CONSTRUCTORS(PushMessagingRouter); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| 67 | 67 |
| 68 #endif // CONTENT_BROWSER_PUSH_MESSAGING_ROUTER_H_ | 68 #endif // CONTENT_BROWSER_PUSH_MESSAGING_ROUTER_H_ |
| OLD | NEW |