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

Side by Side Diff: chrome/browser/resources/hangout_services/thunk.js

Issue 2801853005: Create a private API for controlling WebRTC's AEC3 (Closed)
Patch Set: Remember the override in RPHI Created 3 years, 8 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 chrome.runtime.onMessageExternal.addListener( 5 chrome.runtime.onMessageExternal.addListener(
6 function(message, sender, sendResponse) { 6 function(message, sender, sendResponse) {
7 function doSendResponse(value, errorString) { 7 function doSendResponse(value, errorString) {
8 var error = null; 8 var error = null;
9 if (errorString) { 9 if (errorString) {
10 error = {}; 10 error = {};
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return true; 195 return true;
196 } else if (method == 'logging.startWebRtcEventLogging') { 196 } else if (method == 'logging.startWebRtcEventLogging') {
197 var seconds = message['seconds'] || 0; 197 var seconds = message['seconds'] || 0;
198 chrome.webrtcLoggingPrivate.startWebRtcEventLogging( 198 chrome.webrtcLoggingPrivate.startWebRtcEventLogging(
199 requestInfo, origin, seconds, doSendResponse); 199 requestInfo, origin, seconds, doSendResponse);
200 return true; 200 return true;
201 } else if (method == 'logging.stopWebRtcEventLogging') { 201 } else if (method == 'logging.stopWebRtcEventLogging') {
202 chrome.webrtcLoggingPrivate.stopWebRtcEventLogging( 202 chrome.webrtcLoggingPrivate.stopWebRtcEventLogging(
203 requestInfo, origin, doSendResponse); 203 requestInfo, origin, doSendResponse);
204 return true; 204 return true;
205 } else if (method == 'setAudioExperiments') {
206 var experiments = message['experiments'];
207 chrome.webrtcAudioPrivate.setAudioExperiments(
208 requestInfo, origin, experiments);
209 return true;
Henrik Grunell 2017/04/10 12:33:47 Here, you have to do doSendResponse(); return fal
hlundin-chromium 2017/04/10 13:03:17 Done.
205 } 210 }
206 211
207 throw new Error('Unknown method: ' + method); 212 throw new Error('Unknown method: ' + method);
208 } catch (e) { 213 } catch (e) {
209 doSendResponse(null, e.name + ': ' + e.message); 214 doSendResponse(null, e.name + ': ' + e.message);
210 } 215 }
211 } 216 }
212 ); 217 );
213 218
214 // If Hangouts connects with a port named 'onSinksChangedListener', we 219 // If Hangouts connects with a port named 'onSinksChangedListener', we
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 onSinksChangedPort(port); 325 onSinksChangedPort(port);
321 } else if (port.name == 'chooseDesktopMedia') { 326 } else if (port.name == 'chooseDesktopMedia') {
322 onChooseDesktopMediaPort(port); 327 onChooseDesktopMediaPort(port);
323 } else if (port.name == 'processCpu') { 328 } else if (port.name == 'processCpu') {
324 onProcessCpu(port); 329 onProcessCpu(port);
325 } else { 330 } else {
326 // Unknown port type. 331 // Unknown port type.
327 port.disconnect(); 332 port.disconnect();
328 } 333 }
329 }); 334 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698