OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/monitored_video_stub.h" | 5 #include "remoting/protocol/monitored_video_stub.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/logging.h" | 10 #include "base/logging.h" |
9 #include "remoting/proto/video.pb.h" | 11 #include "remoting/proto/video.pb.h" |
10 | 12 |
11 namespace remoting { | 13 namespace remoting { |
12 namespace protocol { | 14 namespace protocol { |
13 | 15 |
14 MonitoredVideoStub::MonitoredVideoStub(VideoStub* video_stub, | 16 MonitoredVideoStub::MonitoredVideoStub(VideoStub* video_stub, |
15 base::TimeDelta connectivity_check_delay, | 17 base::TimeDelta connectivity_check_delay, |
16 const ChannelStateCallback& callback) | 18 const ChannelStateCallback& callback) |
(...skipping 28 matching lines...) Expand all Loading... |
45 | 47 |
46 void MonitoredVideoStub::NotifyChannelState(bool connected) { | 48 void MonitoredVideoStub::NotifyChannelState(bool connected) { |
47 if (is_connected_ != connected) { | 49 if (is_connected_ != connected) { |
48 is_connected_ = connected; | 50 is_connected_ = connected; |
49 callback_.Run(is_connected_); | 51 callback_.Run(is_connected_); |
50 } | 52 } |
51 } | 53 } |
52 | 54 |
53 } // namespace protocol | 55 } // namespace protocol |
54 } // namespace remoting | 56 } // namespace remoting |
OLD | NEW |