Chromium Code Reviews| Index: remoting/protocol/fake_session.h |
| diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h |
| index 5683241d5b4e581f91ecfc052d0ec30eca4ad2da..2e4f2c76ed86c446eab1a2944e71ca26f700022f 100644 |
| --- a/remoting/protocol/fake_session.h |
| +++ b/remoting/protocol/fake_session.h |
| @@ -155,8 +155,8 @@ class FakeSession : public Session, |
| EventHandler* event_handler() { return event_handler_; } |
| - void set_message_loop(MessageLoop* message_loop) { |
| - message_loop_ = message_loop; |
| + void set_async_creation(bool async_creation) { |
| + async_creation_ = async_creation; |
| } |
| void set_error(ErrorCode error) { error_ = error; } |
| @@ -179,18 +179,28 @@ class FakeSession : public Session, |
| // ChannelFactory interface. |
| virtual void CreateStreamChannel( |
| - const std::string& name, const StreamChannelCallback& callback) OVERRIDE; |
| + const std::string& name, |
| + const StreamChannelCallback& callback) OVERRIDE; |
| virtual void CreateDatagramChannel( |
| const std::string& name, |
| const DatagramChannelCallback& callback) OVERRIDE; |
| virtual void CancelChannelCreation(const std::string& name) OVERRIDE; |
| public: |
| + void CallStreamChannelCallback( |
|
Wez
2012/09/25 17:43:58
nit: NotifyStreamChannelConnected/NotifyStreamChan
Sergey Ulanov
2012/09/25 18:59:08
Done.
|
| + const std::string& name, |
| + const StreamChannelCallback& callback); |
| + void CallDatagramChannelCallback( |
| + const std::string& name, |
| + const DatagramChannelCallback& callback); |
| + |
| EventHandler* event_handler_; |
| scoped_ptr<const CandidateSessionConfig> candidate_config_; |
| SessionConfig config_; |
| MessageLoop* message_loop_; |
| + bool async_creation_; |
| + |
| std::map<std::string, FakeSocket*> stream_channels_; |
| std::map<std::string, FakeUdpSocket*> datagram_channels_; |
| @@ -199,6 +209,8 @@ class FakeSession : public Session, |
| ErrorCode error_; |
| bool closed_; |
| + base::WeakPtrFactory<FakeSession> weak_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FakeSession); |
| }; |