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

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

Issue 550383002: Cleanup ChannelFactory interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_session.cc » ('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_FAKE_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_
6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 virtual ErrorCode error() OVERRIDE; 171 virtual ErrorCode error() OVERRIDE;
172 virtual const std::string& jid() OVERRIDE; 172 virtual const std::string& jid() OVERRIDE;
173 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; 173 virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
174 virtual const SessionConfig& config() OVERRIDE; 174 virtual const SessionConfig& config() OVERRIDE;
175 virtual void set_config(const SessionConfig& config) OVERRIDE; 175 virtual void set_config(const SessionConfig& config) OVERRIDE;
176 virtual ChannelFactory* GetTransportChannelFactory() OVERRIDE; 176 virtual ChannelFactory* GetTransportChannelFactory() OVERRIDE;
177 virtual ChannelFactory* GetMultiplexedChannelFactory() OVERRIDE; 177 virtual ChannelFactory* GetMultiplexedChannelFactory() OVERRIDE;
178 virtual void Close() OVERRIDE; 178 virtual void Close() OVERRIDE;
179 179
180 // ChannelFactory interface. 180 // ChannelFactory interface.
181 virtual void CreateStreamChannel( 181 virtual void CreateChannel(const std::string& name,
182 const std::string& name, 182 const ChannelCreatedCallback& callback) OVERRIDE;
183 const StreamChannelCallback& callback) OVERRIDE;
184 virtual void CreateDatagramChannel(
185 const std::string& name,
186 const DatagramChannelCallback& callback) OVERRIDE;
187 virtual void CancelChannelCreation(const std::string& name) OVERRIDE; 183 virtual void CancelChannelCreation(const std::string& name) OVERRIDE;
188 184
189 public: 185 public:
190 void NotifyStreamChannelCallback( 186 void NotifyChannelCreated(const std::string& name,
191 const std::string& name, 187 const ChannelCreatedCallback& callback);
192 const StreamChannelCallback& callback);
193 void NotifyDatagramChannelCallback(
194 const std::string& name,
195 const DatagramChannelCallback& callback);
196 188
197 EventHandler* event_handler_; 189 EventHandler* event_handler_;
198 scoped_ptr<const CandidateSessionConfig> candidate_config_; 190 scoped_ptr<const CandidateSessionConfig> candidate_config_;
199 SessionConfig config_; 191 SessionConfig config_;
200 base::MessageLoop* message_loop_; 192 base::MessageLoop* message_loop_;
201 193
202 bool async_creation_; 194 bool async_creation_;
203 195
204 std::map<std::string, FakeSocket*> stream_channels_; 196 std::map<std::string, FakeSocket*> stream_channels_;
205 std::map<std::string, FakeUdpSocket*> datagram_channels_; 197 std::map<std::string, FakeUdpSocket*> datagram_channels_;
206 198
207 std::string jid_; 199 std::string jid_;
208 200
209 ErrorCode error_; 201 ErrorCode error_;
210 bool closed_; 202 bool closed_;
211 203
212 base::WeakPtrFactory<FakeSession> weak_factory_; 204 base::WeakPtrFactory<FakeSession> weak_factory_;
213 205
214 DISALLOW_COPY_AND_ASSIGN(FakeSession); 206 DISALLOW_COPY_AND_ASSIGN(FakeSession);
215 }; 207 };
216 208
217 } // namespace protocol 209 } // namespace protocol
218 } // namespace remoting 210 } // namespace remoting
219 211
220 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ 212 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698