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 package org.chromium.components.devtools_bridge; | 5 package org.chromium.components.devtools_bridge; |
6 | 6 |
| 7 import org.chromium.base.annotations.SuppressFBWarnings; |
| 8 |
7 import java.util.concurrent.CountDownLatch; | 9 import java.util.concurrent.CountDownLatch; |
8 | 10 |
9 /** | 11 /** |
10 * Mock for AbstractPeerConnection.Observer. | 12 * Mock for AbstractPeerConnection.Observer. |
11 */ | 13 */ |
| 14 @SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") |
12 public class PeerConnectionObserverMock implements AbstractPeerConnection.Observ
er { | 15 public class PeerConnectionObserverMock implements AbstractPeerConnection.Observ
er { |
13 public AbstractPeerConnection.SessionDescriptionType localDescriptionType; | 16 public AbstractPeerConnection.SessionDescriptionType localDescriptionType; |
14 public String localDescription; | 17 public String localDescription; |
15 | 18 |
16 public final CountDownLatch localDescriptionAvailable = new CountDownLatch(1
); | 19 public final CountDownLatch localDescriptionAvailable = new CountDownLatch(1
); |
17 public final CountDownLatch failureAvailable = new CountDownLatch(1); | 20 public final CountDownLatch failureAvailable = new CountDownLatch(1); |
18 public final CountDownLatch remoteDescriptionSet = new CountDownLatch(1); | 21 public final CountDownLatch remoteDescriptionSet = new CountDownLatch(1); |
19 public final CountDownLatch connected = new CountDownLatch(1); | 22 public final CountDownLatch connected = new CountDownLatch(1); |
20 | 23 |
21 public AbstractPeerConnection iceCandidatesSink; | 24 public AbstractPeerConnection iceCandidatesSink; |
(...skipping 20 matching lines...) Expand all Loading... |
42 public void onIceCandidate(String iceCandidate) { | 45 public void onIceCandidate(String iceCandidate) { |
43 if (iceCandidatesSink != null) | 46 if (iceCandidatesSink != null) |
44 iceCandidatesSink.addIceCandidate(iceCandidate); | 47 iceCandidatesSink.addIceCandidate(iceCandidate); |
45 } | 48 } |
46 | 49 |
47 @Override | 50 @Override |
48 public void onIceConnectionChange(boolean connected) { | 51 public void onIceConnectionChange(boolean connected) { |
49 this.connected.countDown(); | 52 this.connected.countDown(); |
50 } | 53 } |
51 } | 54 } |
OLD | NEW |