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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler.h

Issue 704923002: Add polling and audio check to copresence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/handlers/audio/audio_directive_handler.h
diff --git a/components/copresence/handlers/audio/audio_directive_handler.h b/components/copresence/handlers/audio/audio_directive_handler.h
index b6de11dda5f4579c40a6a201247185c4fcb97445..f0a6faf7a5a15c31de1569011bec746a0c52c533 100644
--- a/components/copresence/handlers/audio/audio_directive_handler.h
+++ b/components/copresence/handlers/audio/audio_directive_handler.h
@@ -17,6 +17,7 @@ class TimeDelta;
namespace copresence {
class TokenInstruction;
+class WhispernetClient;
// The AudioDirectiveHandler handles audio transmit and receive instructions.
class AudioDirectiveHandler {
@@ -24,9 +25,8 @@ class AudioDirectiveHandler {
virtual ~AudioDirectiveHandler() {}
// Do not use this class before calling this.
- virtual void Initialize(
- const AudioManager::DecodeSamplesCallback& decode_cb,
- const AudioManager::EncodeTokenCallback& encode_cb) = 0;
+ virtual void Initialize(WhispernetClient* whispernet_client,
+ const TokensCallback& tokens_cb) = 0;
// Adds an instruction to our handler. The instruction will execute and be
// removed after the ttl expires.
@@ -39,6 +39,9 @@ class AudioDirectiveHandler {
// Returns the currently playing token.
virtual const std::string PlayingToken(AudioType type) const = 0;
+
+ // Returns if we have heard the currently playing audio token.
+ virtual bool IsPlayingTokenHeard(AudioType type) const = 0;
};
} // namespace copresence

Powered by Google App Engine
This is Rietveld 408576698