Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java

Issue 1998483003: General cleanup on AppRTC Android Demo codebase (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove unused string that was accidentally added. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 27 matching lines...) Expand all
38 private static final String TAG = "RoomRTCClient"; 38 private static final String TAG = "RoomRTCClient";
39 private static final int TURN_HTTP_TIMEOUT_MS = 5000; 39 private static final int TURN_HTTP_TIMEOUT_MS = 5000;
40 private final RoomParametersFetcherEvents events; 40 private final RoomParametersFetcherEvents events;
41 private final String roomUrl; 41 private final String roomUrl;
42 private final String roomMessage; 42 private final String roomMessage;
43 private AsyncHttpURLConnection httpConnection; 43 private AsyncHttpURLConnection httpConnection;
44 44
45 /** 45 /**
46 * Room parameters fetcher callbacks. 46 * Room parameters fetcher callbacks.
47 */ 47 */
48 public static interface RoomParametersFetcherEvents { 48 public interface RoomParametersFetcherEvents {
49 /** 49 /**
50 * Callback fired once the room's signaling parameters 50 * Callback fired once the room's signaling parameters
51 * SignalingParameters are extracted. 51 * SignalingParameters are extracted.
52 */ 52 */
53 public void onSignalingParametersReady(final SignalingParameters params); 53 void onSignalingParametersReady(final SignalingParameters params);
54 54
55 /** 55 /**
56 * Callback for room parameters extraction error. 56 * Callback for room parameters extraction error.
57 */ 57 */
58 public void onSignalingParametersError(final String description); 58 void onSignalingParametersError(final String description);
59 } 59 }
60 60
61 public RoomParametersFetcher(String roomUrl, String roomMessage, 61 public RoomParametersFetcher(String roomUrl, String roomMessage,
62 final RoomParametersFetcherEvents events) { 62 final RoomParametersFetcherEvents events) {
63 this.roomUrl = roomUrl; 63 this.roomUrl = roomUrl;
64 this.roomMessage = roomMessage; 64 this.roomMessage = roomMessage;
65 this.events = events; 65 this.events = events;
66 } 66 }
67 67
68 public void makeRequest() { 68 public void makeRequest() {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return ret; 223 return ret;
224 } 224 }
225 225
226 // Return the contents of an InputStream as a String. 226 // Return the contents of an InputStream as a String.
227 private static String drainStream(InputStream in) { 227 private static String drainStream(InputStream in) {
228 Scanner s = new Scanner(in).useDelimiter("\\A"); 228 Scanner s = new Scanner(in).useDelimiter("\\A");
229 return s.hasNext() ? s.next() : ""; 229 return s.hasNext() ? s.next() : "";
230 } 230 }
231 231
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698