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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler_impl.cc

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.cc
diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.cc b/components/copresence/handlers/audio/audio_directive_handler_impl.cc
index 32c0970e839985ec8a0f1eff376dd2ec9b2f6fa3..c5c57f933e08e93d4009c35515338b7db3c39c9c 100644
--- a/components/copresence/handlers/audio/audio_directive_handler_impl.cc
+++ b/components/copresence/handlers/audio/audio_directive_handler_impl.cc
@@ -55,12 +55,11 @@ AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl(
AudioDirectiveHandlerImpl::~AudioDirectiveHandlerImpl() {}
-void AudioDirectiveHandlerImpl::Initialize(
- const AudioManager::DecodeSamplesCallback& decode_cb,
- const AudioManager::EncodeTokenCallback& encode_cb) {
+void AudioDirectiveHandlerImpl::Initialize(WhispernetClient* whispernet_client,
+ const TokensCallback& tokens_cb) {
if (!audio_manager_)
audio_manager_.reset(new AudioManagerImpl());
- audio_manager_->Initialize(decode_cb, encode_cb);
+ audio_manager_->Initialize(whispernet_client, tokens_cb);
DCHECK(transmits_lists_.empty());
transmits_lists_.push_back(new AudioDirectiveList(clock_));
@@ -137,6 +136,9 @@ const std::string AudioDirectiveHandlerImpl::PlayingToken(
return audio_manager_->GetToken(type);
}
+bool AudioDirectiveHandlerImpl::IsPlayingTokenHeard(AudioType type) const {
+ return audio_manager_->IsPlayingTokenHeard(type);
+}
// Private functions.

Powered by Google App Engine
This is Rietveld 408576698