Index: components/copresence/handlers/directive_handler.h |
diff --git a/components/copresence/handlers/directive_handler.h b/components/copresence/handlers/directive_handler.h |
index 24e17894ac032f64a225c8468132da603089e826..59803c6f3a0070eba5a0e63709ae49096c0c8cd7 100644 |
--- a/components/copresence/handlers/directive_handler.h |
+++ b/components/copresence/handlers/directive_handler.h |
@@ -8,12 +8,11 @@ |
#include <string> |
#include "base/macros.h" |
-#include "components/copresence/public/copresence_constants.h" |
+#include "components/audio_modem/public/whispernet_client.h" |
namespace copresence { |
class Directive; |
-class WhispernetClient; |
// The directive handler manages transmit and receive directives. |
class DirectiveHandler { |
@@ -21,13 +20,15 @@ class DirectiveHandler { |
DirectiveHandler() {} |
virtual ~DirectiveHandler() {} |
- // Starts processing directives with the provided Whispernet client. |
+ // Starts processing directives with the provided Whispernet delegate. |
// Directives will be queued until this function is called. |
// |whispernet_client| is owned by the caller and must outlive the |
// DirectiveHandler. |
// |tokens_cb| is called for all audio tokens found in recorded audio. |
- virtual void Start(WhispernetClient* whispernet_client, |
- const TokensCallback& tokens_cb) = 0; |
+ // TODO(ckehoe): Have the Modem handle initialization of the client. |
+ // Then none of our classes need this Init() mechanism. |
+ virtual void Start(audio_modem::WhispernetClient* whispernet_client, |
+ const audio_modem::TokensCallback& tokens_cb) = 0; |
// Adds a directive to handle. |
virtual void AddDirective(const Directive& directive) = 0; |
@@ -35,10 +36,11 @@ class DirectiveHandler { |
// Removes any directives associated with the given operation id. |
virtual void RemoveDirectives(const std::string& op_id) = 0; |
- // TODO(rkc): Too many audio specific functions here. |
- // Find a better way to get this information to the copresence manager. |
- virtual const std::string GetCurrentAudioToken(AudioType type) const = 0; |
- virtual bool IsAudioTokenHeard(AudioType type) const = 0; |
+ // TODO(ckehoe): Move the Modem to be owned by CopresenceManager. |
+ // Then this will not need to be passed all the way down the tree. |
+ virtual const std::string |
+ GetCurrentAudioToken(audio_modem::AudioType type) const = 0; |
+ virtual bool IsAudioTokenHeard(audio_modem::AudioType type) const = 0; |
private: |
DISALLOW_COPY_AND_ASSIGN(DirectiveHandler); |