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 CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 public BackgroundTrigger { | 59 public BackgroundTrigger { |
60 public: | 60 public: |
61 // If any Service Workers are using push, starts GCM and adds an app handler. | 61 // If any Service Workers are using push, starts GCM and adds an app handler. |
62 static void InitializeForProfile(Profile* profile); | 62 static void InitializeForProfile(Profile* profile); |
63 | 63 |
64 explicit PushMessagingServiceImpl(Profile* profile); | 64 explicit PushMessagingServiceImpl(Profile* profile); |
65 ~PushMessagingServiceImpl() override; | 65 ~PushMessagingServiceImpl() override; |
66 | 66 |
67 // gcm::GCMAppHandler implementation. | 67 // gcm::GCMAppHandler implementation. |
68 void ShutdownHandler() override; | 68 void ShutdownHandler() override; |
| 69 void OnStoreReset() override; |
69 void OnMessage(const std::string& app_id, | 70 void OnMessage(const std::string& app_id, |
70 const gcm::IncomingMessage& message) override; | 71 const gcm::IncomingMessage& message) override; |
71 void OnMessagesDeleted(const std::string& app_id) override; | 72 void OnMessagesDeleted(const std::string& app_id) override; |
72 void OnSendError( | 73 void OnSendError( |
73 const std::string& app_id, | 74 const std::string& app_id, |
74 const gcm::GCMClient::SendErrorDetails& send_error_details) override; | 75 const gcm::GCMClient::SendErrorDetails& send_error_details) override; |
75 void OnSendAcknowledged(const std::string& app_id, | 76 void OnSendAcknowledged(const std::string& app_id, |
76 const std::string& message_id) override; | 77 const std::string& message_id) override; |
77 bool CanHandle(const std::string& app_id) const override; | 78 bool CanHandle(const std::string& app_id) const override; |
78 | 79 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // we can finish processing them without being interrupted. | 274 // we can finish processing them without being interrupted. |
274 std::unique_ptr<ScopedKeepAlive> in_flight_keep_alive_; | 275 std::unique_ptr<ScopedKeepAlive> in_flight_keep_alive_; |
275 #endif | 276 #endif |
276 | 277 |
277 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 278 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
278 | 279 |
279 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 280 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
280 }; | 281 }; |
281 | 282 |
282 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ | 283 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
OLD | NEW |