Index: components/gcm_driver/gcm_app_handler.h |
diff --git a/components/gcm_driver/gcm_app_handler.h b/components/gcm_driver/gcm_app_handler.h |
index 31bab34d8905a19e5d36fd75ac13fc25dd642a13..b4b497e3975fa4fa5fb408f126b4746c8b760025 100644 |
--- a/components/gcm_driver/gcm_app_handler.h |
+++ b/components/gcm_driver/gcm_app_handler.h |
@@ -16,8 +16,8 @@ namespace gcm { |
// app. |
class GCMAppHandler { |
public: |
- GCMAppHandler() {} |
- virtual ~GCMAppHandler() {} |
+ GCMAppHandler(); |
+ virtual ~GCMAppHandler(); |
// Called to do all the cleanup when GCM is shutting down. |
// In the case that multiple apps share the same app handler, it should be |
@@ -35,6 +35,16 @@ class GCMAppHandler { |
virtual void OnSendError( |
const std::string& app_id, |
const GCMClient::SendErrorDetails& send_error_details) = 0; |
+ |
+ // Called when a new connection is established and a successful handshake |
+ // has been performed. Note that |ip_endpoint| is only set if available for |
+ // the current platform. |
+ // Default implementation does nothing. |
+ virtual void OnConnected(const net::IPEndPoint& ip_endpoint); |
+ |
+ // Called when the connection is interrupted. |
+ // Default implementation does nothing. |
+ virtual void OnDisconnected(); |
}; |
} // namespace gcm |