diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-12 21:56:41 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-12 21:56:41 +0000 |
commit | b1f94ee9e16d9905426355a529803f3433d00c6e (patch) | |
tree | f496375f02814918f6b2e192ed39cf0359baae8b /remoting/protocol/fake_session.cc | |
parent | 6fd9e4e7003bb6bf72e081c882799536c8774625 (diff) | |
download | chromium_src-b1f94ee9e16d9905426355a529803f3433d00c6e.zip chromium_src-b1f94ee9e16d9905426355a529803f3433d00c6e.tar.gz chromium_src-b1f94ee9e16d9905426355a529803f3433d00c6e.tar.bz2 |
Use callback interface for state notifications in Session interface.
Previously remoting::protocol::Session interface was using base::Callback for
state change and route change notifications. Using callback interface makes code
simpler in many places. I'm also going to add new method to that interface to
fix linked bug.
BUG=131411
Review URL: https://chromiumcodereview.appspot.com/10702132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/fake_session.cc')
-rw-r--r-- | remoting/protocol/fake_session.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc index 30a6ddb..a6a3aca 100644 --- a/remoting/protocol/fake_session.cc +++ b/remoting/protocol/fake_session.cc @@ -224,7 +224,8 @@ bool FakeUdpSocket::SetSendBufferSize(int32 size) { } FakeSession::FakeSession() - : candidate_config_(CandidateSessionConfig::CreateDefault()), + : event_handler_(NULL), + candidate_config_(CandidateSessionConfig::CreateDefault()), config_(SessionConfig::GetDefault()), message_loop_(NULL), jid_(kTestJid), @@ -242,12 +243,8 @@ FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) { return datagram_channels_[name]; } -void FakeSession::SetStateChangeCallback(const StateChangeCallback& callback) { - state_change_callback_ = callback; -} - -void FakeSession::SetRouteChangeCallback(const RouteChangeCallback& callback) { - route_change_callback_ = callback; +void FakeSession::SetEventHandler(EventHandler* event_handler) { + event_handler_ = event_handler; } ErrorCode FakeSession::error() { |