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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler_impl.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_impl.h
diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.h b/components/copresence/handlers/audio/audio_directive_handler_impl.h
index 37b172f639a3eacd3cf143e85461f28a472e334a..40dc062cd73b024e1334afbbf93ff9e84236dc11 100644
--- a/components/copresence/handlers/audio/audio_directive_handler_impl.h
+++ b/components/copresence/handlers/audio/audio_directive_handler_impl.h
@@ -43,21 +43,15 @@ class AudioDirectiveHandlerImpl final : public AudioDirectiveHandler {
~AudioDirectiveHandlerImpl();
- // Do not use this class before calling this.
- void Initialize(const AudioManager::DecodeSamplesCallback& decode_cb,
- const AudioManager::EncodeTokenCallback& encode_cb) override;
-
- // Adds an instruction to our handler. The instruction will execute and be
- // removed after the ttl expires.
+ // AudioDirectiveHandler overrides:
+ void Initialize(WhispernetClient* whispernet_client,
+ const TokensCallback& tokens_cb) override;
void AddInstruction(const copresence::TokenInstruction& instruction,
const std::string& op_id,
base::TimeDelta ttl_ms) override;
-
- // Removes all instructions associated with this operation id.
void RemoveInstructions(const std::string& op_id) override;
-
- // Returns the currently playing token.
const std::string PlayingToken(AudioType type) const override;
+ bool IsPlayingTokenHeard(AudioType type) const override;
private:
// Processes the next active instruction,

Powered by Google App Engine
This is Rietveld 408576698