| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/fake_connection_to_host.h" | 5 #include "remoting/protocol/fake_connection_to_host.h" |
| 6 | 6 |
| 7 #include "remoting/protocol/authenticator.h" | 7 #include "remoting/protocol/authenticator.h" |
| 8 | 8 |
| 9 namespace remoting { | 9 namespace remoting { |
| 10 namespace test { | 10 namespace test { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 void FakeConnectionToHost::SignalConnectionReady(bool ready) { | 81 void FakeConnectionToHost::SignalConnectionReady(bool ready) { |
| 82 DCHECK(event_callback_); | 82 DCHECK(event_callback_); |
| 83 | 83 |
| 84 event_callback_->OnConnectionReady(ready); | 84 event_callback_->OnConnectionReady(ready); |
| 85 } | 85 } |
| 86 | 86 |
| 87 const protocol::SessionConfig& FakeConnectionToHost::config() { | 87 const protocol::SessionConfig& FakeConnectionToHost::config() { |
| 88 return *session_config_; | 88 return session_config_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 protocol::ClipboardStub* FakeConnectionToHost::clipboard_forwarder() { | 91 protocol::ClipboardStub* FakeConnectionToHost::clipboard_forwarder() { |
| 92 return &mock_clipboard_stub_; | 92 return &mock_clipboard_stub_; |
| 93 } | 93 } |
| 94 | 94 |
| 95 protocol::HostStub* FakeConnectionToHost::host_stub() { | 95 protocol::HostStub* FakeConnectionToHost::host_stub() { |
| 96 return &mock_host_stub_; | 96 return &mock_host_stub_; |
| 97 } | 97 } |
| 98 | 98 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 109 DCHECK(state == FAILED || error == protocol::OK); | 109 DCHECK(state == FAILED || error == protocol::OK); |
| 110 | 110 |
| 111 if (state != state_) { | 111 if (state != state_) { |
| 112 state_ = state; | 112 state_ = state; |
| 113 event_callback_->OnConnectionState(state_, error); | 113 event_callback_->OnConnectionState(state_, error); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace test | 117 } // namespace test |
| 118 } // namespace remoting | 118 } // namespace remoting |
| OLD | NEW |