| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual ~ExtensionGCMAppHandler(); | 44 virtual ~ExtensionGCMAppHandler(); |
| 45 | 45 |
| 46 // BrowserContextKeyedAPI implementation. | 46 // BrowserContextKeyedAPI implementation. |
| 47 static BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>* | 47 static BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>* |
| 48 GetFactoryInstance(); | 48 GetFactoryInstance(); |
| 49 | 49 |
| 50 // gcm::GCMAppHandler implementation. | 50 // gcm::GCMAppHandler implementation. |
| 51 virtual void ShutdownHandler() OVERRIDE; | 51 virtual void ShutdownHandler() OVERRIDE; |
| 52 virtual void OnMessage( | 52 virtual void OnMessage( |
| 53 const std::string& app_id, | 53 const std::string& app_id, |
| 54 const gcm::GCMClient::IncomingMessage& message) OVERRIDE; | 54 const gcm::IncomingMessage& message) OVERRIDE; |
| 55 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; | 55 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; |
| 56 virtual void OnSendError( | 56 virtual void OnSendError( |
| 57 const std::string& app_id, | 57 const std::string& app_id, |
| 58 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; | 58 const gcm::SendErrorDetails& send_error_details) OVERRIDE; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 virtual void OnUnregisterCompleted(const std::string& app_id, | 61 virtual void OnUnregisterCompleted(const std::string& app_id, |
| 62 gcm::GCMClient::Result result); | 62 gcm::Result result); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 friend class BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>; | 65 friend class BrowserContextKeyedAPIFactory<ExtensionGCMAppHandler>; |
| 66 | 66 |
| 67 // content::NotificationObserver implementation. | 67 // content::NotificationObserver implementation. |
| 68 virtual void Observe(int type, | 68 virtual void Observe(int type, |
| 69 const content::NotificationSource& source, | 69 const content::NotificationSource& source, |
| 70 const content::NotificationDetails& details) OVERRIDE; | 70 const content::NotificationDetails& details) OVERRIDE; |
| 71 | 71 |
| 72 // ExtensionRegistryObserver implementation. | 72 // ExtensionRegistryObserver implementation. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; | 97 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); | 99 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace extensions | 102 } // namespace extensions |
| 103 | 103 |
| 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
| OLD | NEW |