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

Unified Diff: chrome/common/extensions/api/copresence_private.idl

Issue 438513002: Add the whispernet proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/copresence_private.idl
diff --git a/chrome/common/extensions/api/copresence_private.idl b/chrome/common/extensions/api/copresence_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..1f9634af1b5d4e689df1a91fe97ee649e8728820
--- /dev/null
+++ b/chrome/common/extensions/api/copresence_private.idl
@@ -0,0 +1,49 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Use the <code>chrome.copresencePrivate</code> API to interface with Chrome
+// from the whispernet_proxy extension.
+namespace copresencePrivate {
+
+ dictionary PlayParameters {
+ double sampleRate;
+ long bitsPerSample;
+ double carrierFrequency;
+ long repetitions;
+ };
+
+ dictionary RecordParameters {
+ double sampleRate;
+ long bitsPerSample;
+ long channels;
+ double carrierFrequency;
+ };
+
+ dictionary AudioParameters {
+ PlayParameters play;
+ RecordParameters record;
+ };
+
+ interface Functions {
+ // Send a boolean indicating whether our initialization was successful.
+ static void sendInitialized(boolean success);
+ // Sends an array of found tokens to Chrome.
+ static void sendFound(DOMString[] tokens);
+ // Send an array buffer of samples encoded for the specified token.
+ static void sendSamples(DOMString token, ArrayBuffer samples);
+ // Send a boolean indicating whether we detected a broadcast or not.
+ static void sendDetect(boolean detected);
+ };
+
+ interface Events {
+ // Fired to request initialization of the whisper.net library.
+ static void onInitialize(AudioParameters audioParams);
+ // Fired to request encoding of the given token.
+ static void onEncodeTokenRequest(DOMString base64Token);
+ // Fired when we have new samples to decode.
+ static void onDecodeSamplesRequest(ArrayBuffer audioSamples);
+ // Fired to request a DetectBroadcast.
+ static void onDetectBroadcastRequest();
+ };
+};
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/permissions/chrome_api_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698