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

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

Issue 7605018: Simplify channel creation callbacks in remoting::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 18 matching lines...) Expand all
29 public: 29 public:
30 enum State { 30 enum State {
31 INITIALIZING, 31 INITIALIZING,
32 CONNECTING, 32 CONNECTING,
33 CONNECTED, 33 CONNECTED,
34 CLOSED, 34 CLOSED,
35 FAILED, 35 FAILED,
36 }; 36 };
37 37
38 typedef Callback1<State>::Type StateChangeCallback; 38 typedef Callback1<State>::Type StateChangeCallback;
39 typedef base::Callback<void(const std::string&, net::StreamSocket*)> 39 typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback;
40 StreamChannelCallback; 40 typedef base::Callback<void(net::Socket*)> DatagramChannelCallback;
41 typedef base::Callback<void(const std::string&, net::Socket*)>
42 DatagramChannelCallback;
43 41
44 Session() { } 42 Session() { }
45 virtual ~Session() { } 43 virtual ~Session() { }
46 44
47 // Set callback that is called when state of the connection is changed. 45 // Set callback that is called when state of the connection is changed.
48 // Must be called on the jingle thread only. 46 // Must be called on the jingle thread only.
49 virtual void SetStateChangeCallback(StateChangeCallback* callback) = 0; 47 virtual void SetStateChangeCallback(StateChangeCallback* callback) = 0;
50 48
51 // Creates new channels for this connection. The specified callback 49 // Creates new channels for this connection. The specified callback
52 // is called when then new channel is created and connected. The 50 // is called when then new channel is created and connected. The
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual void Close() = 0; 97 virtual void Close() = 0;
100 98
101 private: 99 private:
102 DISALLOW_COPY_AND_ASSIGN(Session); 100 DISALLOW_COPY_AND_ASSIGN(Session);
103 }; 101 };
104 102
105 } // namespace protocol 103 } // namespace protocol
106 } // namespace remoting 104 } // namespace remoting
107 105
108 #endif // REMOTING_PROTOCOL_SESSION_H_ 106 #endif // REMOTING_PROTOCOL_SESSION_H_
OLDNEW
« remoting/protocol/rtp_video_reader.cc ('K') | « remoting/protocol/rtp_video_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698