| Index: blimp/net/blimp_connection.h
|
| diff --git a/blimp/net/blimp_connection.h b/blimp/net/blimp_connection.h
|
| index 35336c4f28e8267904a3055c396bdbf2e2a4dd42..18569821ec26e552483fcfa579d954621f6b40c4 100644
|
| --- a/blimp/net/blimp_connection.h
|
| +++ b/blimp/net/blimp_connection.h
|
| @@ -6,15 +6,37 @@
|
| #define BLIMP_NET_BLIMP_CONNECTION_H_
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "blimp/net/blimp_net_export.h"
|
|
|
| namespace blimp {
|
|
|
| -class BLIMP_NET_EXPORT BlimpConnection {
|
| +class BlimpMessageProcessor;
|
| +
|
| +// Encapsulates the state and logic used to exchange BlimpMessages over
|
| +// a network connection.
|
| +class BlimpConnection {
|
| public:
|
| + class DisconnectObserver {
|
| + // Called when the network connection for |this| is disconnected.
|
| + virtual void OnDisconnected() = 0;
|
| + };
|
| +
|
| BlimpConnection();
|
| +
|
| ~BlimpConnection();
|
|
|
| + // Lets |observer| know when the network connection is terminated.
|
| + void AddDisconnectObserver(const DisconnectObserver& observer);
|
| +
|
| + // Sets the processor for BlimpConnection->BrowserSession message routing.
|
| + // Will discontinue use of any previously set message processors.
|
| + void set_incoming_message_processor(
|
| + scoped_ptr<BlimpMessageProcessor> processor);
|
| +
|
| + // Gets a processor for BrowserSession->BlimpConnection message routing.
|
| + scoped_ptr<BlimpMessageProcessor> take_outgoing_message_processor() const;
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(BlimpConnection);
|
| };
|
|
|