Index: components/gcm_driver/default_gcm_app_handler.h |
diff --git a/components/gcm_driver/default_gcm_app_handler.h b/components/gcm_driver/default_gcm_app_handler.h |
index 57613a54bada666684f9ac0c95a70b97c2fd295a..56949536801c0e74424c593ccf3234d14af3c551 100644 |
--- a/components/gcm_driver/default_gcm_app_handler.h |
+++ b/components/gcm_driver/default_gcm_app_handler.h |
@@ -7,6 +7,7 @@ |
#include "base/compiler_specific.h" |
#include "components/gcm_driver/gcm_app_handler.h" |
+#include "net/base/ip_endpoint.h" |
namespace gcm { |
@@ -28,8 +29,18 @@ class DefaultGCMAppHandler : public GCMAppHandler { |
virtual void OnConnected(const net::IPEndPoint& ip_endpoint) OVERRIDE; |
virtual void OnDisconnected() OVERRIDE; |
+ static void RegisterConnectionCallbacks( |
+ void (*on_connected_cb)(const net::IPEndPoint& ip_endpoint), |
+ void (*on_disconnected_cb)()); |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(DefaultGCMAppHandler); |
fgorski
2014/08/21 18:14:16
following stevenjb, move this to the bottom.
|
+ static void NullCallback(const std::string& result); |
fgorski
2014/08/21 18:14:16
I think you don't need NullCallback or ErrorCallba
|
+ static void ErrorCallback(const std::string& error_name, |
+ const std::string& error); |
+ |
+ static void (*on_connected_cb_)(const net::IPEndPoint& ip_endpoint); |
fgorski
2014/08/21 18:14:16
could you typedef and document both of the signatu
|
+ static void (*on_disconnected_cb_)(); |
}; |
} // namespace gcm |