Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2685)

Unified Diff: components/gcm_driver/gcm_app_handler.h

Issue 320993003: [GCM] Add app handler support for connection events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_app_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/gcm_driver/fake_gcm_driver.cc ('k') | components/gcm_driver/gcm_app_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698