| Index: content/browser/push_messaging/push_messaging_message_filter.h
|
| diff --git a/content/browser/push_messaging/push_messaging_message_filter.h b/content/browser/push_messaging/push_messaging_message_filter.h
|
| index 60ea948ad1dd0a435b869c20a0b1d41f3cf3d411..c879776b0189fb3a8c3ea948069f2fc32f9c20d3 100644
|
| --- a/content/browser/push_messaging/push_messaging_message_filter.h
|
| +++ b/content/browser/push_messaging/push_messaging_message_filter.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| +#include "content/common/service_worker/service_worker_status_code.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| #include "content/public/common/push_messaging_status.h"
|
| #include "url/gurl.h"
|
| @@ -77,6 +78,13 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
|
| const std::string& push_registration_id,
|
| PushRegistrationStatus status);
|
|
|
| + void DoPersistRegistration(const RegisterData& data,
|
| + const std::string& push_registration_id);
|
| +
|
| + void DidPersistRegistration(const RegisterData& data,
|
| + const std::string& push_registration_id,
|
| + ServiceWorkerStatusCode service_worker_status);
|
| +
|
| void SendRegisterError(const RegisterData& data,
|
| PushRegistrationStatus status);
|
| void SendRegisterSuccess(const RegisterData& data,
|
| @@ -90,9 +98,13 @@ class PushMessagingMessageFilter : public BrowserMessageFilter {
|
| // Owned by the content embedder's browsing context.
|
| PushMessagingService* service_;
|
|
|
| - // Should only be used for asynchronous calls to the PushMessagingService on
|
| - // the UI thread, which may have external dependencies that supersede the
|
| + // Should only be used for asynchronous calls to ServiceWorkerStorage on the
|
| + // IO thread, which may have external dependencies that supersede the
|
| // lifetime of this messaging filter.
|
| + base::WeakPtrFactory<PushMessagingMessageFilter> weak_factory_io_to_io_;
|
| +
|
| + // TODO(johnme): Remove this, it seems unsafe since this could be destroyed
|
| + // on the IO thread while the callback runs on the UI thread.
|
| base::WeakPtrFactory<PushMessagingMessageFilter> weak_factory_ui_to_ui_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PushMessagingMessageFilter);
|
|
|