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

Side by Side Diff: remoting/protocol/session.h

Issue 10692179: Propagate connection state from networking layer to UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/libjingle_transport_factory.cc ('k') | remoting/protocol/transport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_SESSION_H_
6 #define REMOTING_PROTOCOL_SESSION_H_ 6 #define REMOTING_PROTOCOL_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Called after session state has changed. It is safe to destroy 59 // Called after session state has changed. It is safe to destroy
60 // the session from within the handler if |state| is CLOSED or 60 // the session from within the handler if |state| is CLOSED or
61 // FAILED. 61 // FAILED.
62 virtual void OnSessionStateChange(State state) = 0; 62 virtual void OnSessionStateChange(State state) = 0;
63 63
64 // Called whenever route for the channel specified with 64 // Called whenever route for the channel specified with
65 // |channel_name| changes. Session must not be destroyed by the 65 // |channel_name| changes. Session must not be destroyed by the
66 // handler of this event. 66 // handler of this event.
67 virtual void OnSessionRouteChange(const std::string& channel_name, 67 virtual void OnSessionRouteChange(const std::string& channel_name,
68 const TransportRoute& route) = 0; 68 const TransportRoute& route) = 0;
69
70 // Called when ready state on one of the channels changes. See
71 // comments in transport.h for explanation on what this state
72 // means and how it can used.
73 virtual void OnSessionChannelReady(const std::string& channel_name,
74 bool ready) {}
69 }; 75 };
70 76
71 // TODO(sergeyu): Specify connection error code when channel 77 // TODO(sergeyu): Specify connection error code when channel
72 // connection fails. 78 // connection fails.
73 typedef base::Callback<void(scoped_ptr<net::StreamSocket>)> 79 typedef base::Callback<void(scoped_ptr<net::StreamSocket>)>
74 StreamChannelCallback; 80 StreamChannelCallback;
75 typedef base::Callback<void(scoped_ptr<net::Socket>)> 81 typedef base::Callback<void(scoped_ptr<net::Socket>)>
76 DatagramChannelCallback; 82 DatagramChannelCallback;
77 83
78 Session() {} 84 Session() {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void Close() = 0; 131 virtual void Close() = 0;
126 132
127 private: 133 private:
128 DISALLOW_COPY_AND_ASSIGN(Session); 134 DISALLOW_COPY_AND_ASSIGN(Session);
129 }; 135 };
130 136
131 } // namespace protocol 137 } // namespace protocol
132 } // namespace remoting 138 } // namespace remoting
133 139
134 #endif // REMOTING_PROTOCOL_SESSION_H_ 140 #endif // REMOTING_PROTOCOL_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/libjingle_transport_factory.cc ('k') | remoting/protocol/transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698