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

Unified Diff: components/copresence/handlers/directive_handler.cc

Issue 637223011: Redesign the copresence audio handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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/handlers/directive_handler.cc
diff --git a/components/copresence/handlers/directive_handler.cc b/components/copresence/handlers/directive_handler.cc
index e76dde6fed26116274c1e57ef3403717f132d058..ff1d99be7abbfe4a467b1ca2807cb66b570510ff 100644
--- a/components/copresence/handlers/directive_handler.cc
+++ b/components/copresence/handlers/directive_handler.cc
@@ -13,10 +13,10 @@ namespace copresence {
DirectiveHandler::DirectiveHandler() {}
void DirectiveHandler::Initialize(
- const AudioRecorder::DecodeSamplesCallback& decode_cb,
- const AudioDirectiveHandler::EncodeTokenCallback& encode_cb) {
- audio_handler_.reset(new AudioDirectiveHandler(decode_cb, encode_cb));
- audio_handler_->Initialize();
+ const AudioManager::DecodeSamplesCallback& decode_cb,
+ const AudioManager::EncodeTokenCallback& encode_cb) {
+ audio_handler_.reset(new AudioDirectiveHandler());
+ audio_handler_->Initialize(decode_cb, encode_cb);
}
DirectiveHandler::~DirectiveHandler() {
@@ -53,12 +53,9 @@ void DirectiveHandler::RemoveDirectives(const std::string& op_id) {
audio_handler_->RemoveInstructions(op_id);
}
-const std::string& DirectiveHandler::CurrentAudibleToken() const {
- return audio_handler_->PlayingAudibleToken();
-}
-
-const std::string& DirectiveHandler::CurrentInaudibleToken() const {
- return audio_handler_->PlayingInaudibleToken();
+const std::string& DirectiveHandler::GetCurrentAudioToken(
+ AudioType type) const {
+ return audio_handler_->PlayingToken(type);
}
} // namespace copresence

Powered by Google App Engine
This is Rietveld 408576698