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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // gcm::GCMAppHandler implementation. | 48 // gcm::GCMAppHandler implementation. |
49 virtual void ShutdownHandler() OVERRIDE; | 49 virtual void ShutdownHandler() OVERRIDE; |
50 virtual void OnMessage( | 50 virtual void OnMessage( |
51 const std::string& app_id, | 51 const std::string& app_id, |
52 const gcm::GCMClient::IncomingMessage& message) OVERRIDE; | 52 const gcm::GCMClient::IncomingMessage& message) OVERRIDE; |
53 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; | 53 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; |
54 virtual void OnSendError( | 54 virtual void OnSendError( |
55 const std::string& app_id, | 55 const std::string& app_id, |
56 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; | 56 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; |
| 57 virtual void OnSendAcknowledged(const std::string& app_id, |
| 58 const std::string& message_id) OVERRIDE; |
57 | 59 |
58 protected: | 60 protected: |
59 // Could be overridden by testing purpose. | 61 // Could be overridden by testing purpose. |
60 virtual void OnUnregisterCompleted(const std::string& app_id, | 62 virtual void OnUnregisterCompleted(const std::string& app_id, |
61 gcm::GCMClient::Result result); | 63 gcm::GCMClient::Result result); |
62 virtual void AddAppHandler(const std::string& app_id); | 64 virtual void AddAppHandler(const std::string& app_id); |
63 virtual void RemoveAppHandler(const std::string& app_id); | 65 virtual void RemoveAppHandler(const std::string& app_id); |
64 | 66 |
65 gcm::GCMDriver* GetGCMDriver() const; | 67 gcm::GCMDriver* GetGCMDriver() const; |
66 | 68 |
(...skipping 30 matching lines...) Expand all Loading... |
97 #endif | 99 #endif |
98 | 100 |
99 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; | 101 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; |
100 | 102 |
101 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); | 103 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); |
102 }; | 104 }; |
103 | 105 |
104 } // namespace extensions | 106 } // namespace extensions |
105 | 107 |
106 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 108 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
OLD | NEW |