| 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/webrtc_transport.h" | 5 #include "remoting/protocol/webrtc_transport.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 if (!connecting_callback_.is_null()) | 53 if (!connecting_callback_.is_null()) |
| 54 connecting_callback_.Run(); | 54 connecting_callback_.Run(); |
| 55 } | 55 } |
| 56 void OnWebrtcTransportConnected() override { | 56 void OnWebrtcTransportConnected() override { |
| 57 if (!connected_callback_.is_null()) | 57 if (!connected_callback_.is_null()) |
| 58 connected_callback_.Run(); | 58 connected_callback_.Run(); |
| 59 } | 59 } |
| 60 void OnWebrtcTransportError(ErrorCode error) override { | 60 void OnWebrtcTransportError(ErrorCode error) override { |
| 61 error_callback_.Run(error); | 61 error_callback_.Run(error); |
| 62 } | 62 } |
| 63 void OnWebrtcTransportMediaStreamAdded( |
| 64 scoped_refptr<webrtc::MediaStreamInterface> stream) override {} |
| 65 void OnWebrtcTransportMediaStreamRemoved( |
| 66 scoped_refptr<webrtc::MediaStreamInterface> stream) override {} |
| 63 | 67 |
| 64 private: | 68 private: |
| 65 base::Closure connecting_callback_; | 69 base::Closure connecting_callback_; |
| 66 base::Closure connected_callback_; | 70 base::Closure connected_callback_; |
| 67 ErrorCallback error_callback_; | 71 ErrorCallback error_callback_; |
| 68 | 72 |
| 69 DISALLOW_COPY_AND_ASSIGN(TestTransportEventHandler); | 73 DISALLOW_COPY_AND_ASSIGN(TestTransportEventHandler); |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 } // namespace | 76 } // namespace |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 249 |
| 246 run_loop_.reset(new base::RunLoop()); | 250 run_loop_.reset(new base::RunLoop()); |
| 247 run_loop_->Run(); | 251 run_loop_->Run(); |
| 248 | 252 |
| 249 EXPECT_TRUE(client_socket_); | 253 EXPECT_TRUE(client_socket_); |
| 250 EXPECT_TRUE(host_socket_); | 254 EXPECT_TRUE(host_socket_); |
| 251 } | 255 } |
| 252 | 256 |
| 253 } // namespace protocol | 257 } // namespace protocol |
| 254 } // namespace remoting | 258 } // namespace remoting |
| OLD | NEW |