Chromium Code Reviews| 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 // Use the <code>chrome.copresencePrivate</code> API to interface with Chrome | 5 // Use the <code>chrome.copresencePrivate</code> API to interface with Chrome |
| 6 // from the whispernet_proxy extension. | 6 // from the whispernet_proxy extension. |
| 7 namespace copresencePrivate { | 7 namespace copresencePrivate { |
| 8 // This is the type of decode request. It specifies which decoders to run on | |
| 9 // the given samples. | |
| 10 enum DecodeRequestType { audible, inaudible, both }; | |
|
not at google - send to devlin
2014/10/17 20:17:57
This will only ever be audible/inaudible, right? B
rkc
2014/10/17 21:50:22
Done.
| |
| 8 | 11 |
| 9 dictionary PlayParameters { | 12 dictionary PlayParameters { |
| 10 double sampleRate; | 13 double sampleRate; |
| 11 long bitsPerSample; | 14 long bitsPerSample; |
| 12 double carrierFrequency; | 15 double carrierFrequency; |
| 13 long repetitions; | 16 long repetitions; |
| 14 }; | 17 }; |
| 15 | 18 |
| 16 dictionary RecordParameters { | 19 dictionary RecordParameters { |
| 17 double sampleRate; | 20 double sampleRate; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 40 // Send a boolean indicating whether we detected a broadcast or not. | 43 // Send a boolean indicating whether we detected a broadcast or not. |
| 41 static void sendDetect(boolean detected); | 44 static void sendDetect(boolean detected); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 interface Events { | 47 interface Events { |
| 45 // Fired to request initialization of the whisper.net library. | 48 // Fired to request initialization of the whisper.net library. |
| 46 static void onInitialize(AudioParameters audioParams); | 49 static void onInitialize(AudioParameters audioParams); |
| 47 // Fired to request encoding of the given token. | 50 // Fired to request encoding of the given token. |
| 48 static void onEncodeTokenRequest(DOMString base64Token, boolean audible); | 51 static void onEncodeTokenRequest(DOMString base64Token, boolean audible); |
| 49 // Fired when we have new samples to decode. | 52 // Fired when we have new samples to decode. |
| 50 static void onDecodeSamplesRequest(ArrayBuffer audioSamples); | 53 static void onDecodeSamplesRequest(DecodeRequestType type, |
|
not at google - send to devlin
2014/10/17 20:17:57
This isn't backwards compatible? Not a problem rig
rkc
2014/10/17 21:50:22
Done.
| |
| 54 ArrayBuffer audioSamples); | |
| 51 // Fired to request a DetectBroadcast. | 55 // Fired to request a DetectBroadcast. |
| 52 static void onDetectBroadcastRequest(); | 56 static void onDetectBroadcastRequest(); |
| 53 }; | 57 }; |
| 54 }; | 58 }; |
| OLD | NEW |