| OLD | NEW |
| 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 #include "remoting/protocol/connection_to_host.h" | 5 #include "remoting/protocol/connection_to_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 error_(OK) { | 42 error_(OK) { |
| 43 } | 43 } |
| 44 | 44 |
| 45 ConnectionToHost::~ConnectionToHost() { | 45 ConnectionToHost::~ConnectionToHost() { |
| 46 } | 46 } |
| 47 | 47 |
| 48 ClipboardStub* ConnectionToHost::clipboard_stub() { | 48 ClipboardStub* ConnectionToHost::clipboard_stub() { |
| 49 return &clipboard_forwarder_; | 49 return &clipboard_forwarder_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 HostStub* ConnectionToHost::host_stub() { |
| 53 // TODO(wez): Add a HostFilter class, equivalent to input filter. |
| 54 return control_dispatcher_.get(); |
| 55 } |
| 56 |
| 52 InputStub* ConnectionToHost::input_stub() { | 57 InputStub* ConnectionToHost::input_stub() { |
| 53 return &event_forwarder_; | 58 return &event_forwarder_; |
| 54 } | 59 } |
| 55 | 60 |
| 56 void ConnectionToHost::Connect(scoped_refptr<XmppProxy> xmpp_proxy, | 61 void ConnectionToHost::Connect(scoped_refptr<XmppProxy> xmpp_proxy, |
| 57 const std::string& local_jid, | 62 const std::string& local_jid, |
| 58 const std::string& host_jid, | 63 const std::string& host_jid, |
| 59 const std::string& host_public_key, | 64 const std::string& host_public_key, |
| 60 scoped_ptr<Authenticator> authenticator, | 65 scoped_ptr<Authenticator> authenticator, |
| 61 HostEventCallback* event_callback, | 66 HostEventCallback* event_callback, |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 251 |
| 247 if (state != state_) { | 252 if (state != state_) { |
| 248 state_ = state; | 253 state_ = state; |
| 249 error_ = error; | 254 error_ = error; |
| 250 event_callback_->OnConnectionState(state_, error_); | 255 event_callback_->OnConnectionState(state_, error_); |
| 251 } | 256 } |
| 252 } | 257 } |
| 253 | 258 |
| 254 } // namespace protocol | 259 } // namespace protocol |
| 255 } // namespace remoting | 260 } // namespace remoting |
| OLD | NEW |