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_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 class ExtensionGCMAppHandler : public gcm::GCMAppHandler, | 41 class ExtensionGCMAppHandler : public gcm::GCMAppHandler, |
42 public BrowserContextKeyedAPI, | 42 public BrowserContextKeyedAPI, |
43 public ExtensionRegistryObserver { | 43 public ExtensionRegistryObserver { |
44 public: | 44 public: |
45 explicit ExtensionGCMAppHandler(content::BrowserContext* context); | 45 explicit ExtensionGCMAppHandler(content::BrowserContext* context); |
46 ~ExtensionGCMAppHandler() override; | 46 ~ExtensionGCMAppHandler() override; |
47 | 47 |
48 // BrowserContextKeyedAPI implementation. | 48 // BrowserContextKeyedAPI implementation. |
49 static BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>* | 49 static BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>* |
50 GetFactoryInstance(); | 50 GetFactoryInstance(); |
| 51 void Shutdown() override; |
51 | 52 |
52 // gcm::GCMAppHandler implementation. | 53 // gcm::GCMAppHandler implementation. |
53 void ShutdownHandler() override; | 54 void ShutdownHandler() override; |
54 void OnStoreReset() override; | 55 void OnStoreReset() override; |
55 void OnMessage(const std::string& app_id, | 56 void OnMessage(const std::string& app_id, |
56 const gcm::IncomingMessage& message) override; | 57 const gcm::IncomingMessage& message) override; |
57 void OnMessagesDeleted(const std::string& app_id) override; | 58 void OnMessagesDeleted(const std::string& app_id) override; |
58 void OnSendError( | 59 void OnSendError( |
59 const std::string& app_id, | 60 const std::string& app_id, |
60 const gcm::GCMClient::SendErrorDetails& send_error_details) override; | 61 const gcm::GCMClient::SendErrorDetails& send_error_details) override; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::unique_ptr<extensions::GcmJsEventRouter> js_event_router_; | 104 std::unique_ptr<extensions::GcmJsEventRouter> js_event_router_; |
104 | 105 |
105 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; | 106 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; |
106 | 107 |
107 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); | 108 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace extensions | 111 } // namespace extensions |
111 | 112 |
112 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 113 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
OLD | NEW |