Chromium Code Reviews| Index: components/gcm_driver/gcm_connection_observer.h |
| diff --git a/components/gcm_driver/gcm_connection_observer.h b/components/gcm_driver/gcm_connection_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1a18f6b9499e69123adad7befdb5fff5ecebb303 |
| --- /dev/null |
| +++ b/components/gcm_driver/gcm_connection_observer.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_GCM_DRIVER_GCM_CONNECTION_OBSERVER_H_ |
| +#define COMPONENTS_GCM_DRIVER_GCM_CONNECTION_OBSERVER_H_ |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace net { |
| +class IPEndPoint; |
| +} |
| + |
| +namespace gcm { |
| + |
| +// Defines the interface to provide handling and event routing logic for a given |
|
jianli
2014/08/27 23:34:17
Update comment.
fgorski
2014/08/27 23:51:45
Done.
|
| +// app. |
| +class GCMConnectionObserver { |
| + public: |
| + GCMConnectionObserver(); |
| + virtual ~GCMConnectionObserver(); |
| + |
| + // 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 |
| + |
| +#endif // COMPONENTS_GCM_DRIVER_GCM_APP_HANDLER_H_ |
|
jianli
2014/08/27 23:34:17
Update comment.
fgorski
2014/08/27 23:51:45
Done.
|