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

Unified Diff: components/copresence/public/whispernet_client.h

Issue 460743004: Improve audible token detection. (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: components/copresence/public/whispernet_client.h
diff --git a/components/copresence/public/whispernet_client.h b/components/copresence/public/whispernet_client.h
index 6926fff692720d45d98ae00d80ccac09dc827141..e800d85edc8bada536293f98928f751b3197169b 100644
--- a/components/copresence/public/whispernet_client.h
+++ b/components/copresence/public/whispernet_client.h
@@ -18,6 +18,13 @@ class AudioBusRefCounted;
namespace copresence {
+struct FullToken {
+ FullToken(const std::string& token, bool audible)
+ : token(token), audible(audible) {}
+ std::string token;
+ bool audible;
+};
+
// The interface that the whispernet client needs to implement. These methods
// provide us the ability to use the audio medium in copresence. Currently since
// the only medium that copresence uses is audio, the implementation of this
@@ -27,10 +34,11 @@ class WhispernetClient {
// Generic callback to indicate a boolean success or failure.
typedef base::Callback<void(bool)> SuccessCallback;
// Callback that returns detected tokens.
- typedef base::Callback<void(const std::vector<std::string>&)> TokensCallback;
+ typedef base::Callback<void(const std::vector<FullToken>&)> TokensCallback;
// Callback that returns encoded samples for a given token.
- typedef base::Callback<
- void(const std::string&, const scoped_refptr<media::AudioBusRefCounted>&)>
+ typedef base::Callback<void(const std::string&,
+ bool,
+ const scoped_refptr<media::AudioBusRefCounted>&)>
SamplesCallback;
// Initialize the whispernet client and call the callback when done. The
« no previous file with comments | « components/copresence/handlers/audio/audio_directive_list_unittest.cc ('k') | components/copresence/rpc/rpc_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698