Index: components/copresence/test/stub_whispernet_client.h |
diff --git a/components/copresence/test/stub_whispernet_client.h b/components/copresence/test/stub_whispernet_client.h |
index 33d4fc1b0ddac303d65b97a9301a5284c211ad0f..235689656bee58d7505a9b59db98a8c6fd58c48c 100644 |
--- a/components/copresence/test/stub_whispernet_client.h |
+++ b/components/copresence/test/stub_whispernet_client.h |
@@ -10,16 +10,22 @@ |
#include "base/callback.h" |
#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
#include "components/copresence/public/whispernet_client.h" |
+#include "components/copresence/tokens.h" |
+#include "media/base/audio_bus.h" |
namespace copresence { |
// A simple WhispernetClient for testing. |
class StubWhispernetClient final : public WhispernetClient { |
public: |
- // Constructor. The client can optionally be configured to respond |
- // as if Initialize() has completed. By default it does not. |
- explicit StubWhispernetClient(bool complete_initialization = false); |
+ // Constructor. |samples| and |tokens|, if specified, |
+ // will be returned for any encoding and decoding requests. |
+ StubWhispernetClient( |
+ scoped_refptr<media::AudioBusRefCounted> samples = |
+ scoped_refptr<media::AudioBusRefCounted>(), |
+ const std::vector<AudioToken>& tokens = std::vector<AudioToken>()); |
~StubWhispernetClient() override; |
@@ -43,11 +49,10 @@ class StubWhispernetClient final : public WhispernetClient { |
SuccessCallback GetInitializedCallback() override; |
private: |
- bool complete_initialization_; |
TokensCallback tokens_cb_; |
SamplesCallback samples_cb_; |
- std::vector<AudioToken> tokens_; |
scoped_refptr<media::AudioBusRefCounted> samples_; |
+ std::vector<AudioToken> tokens_; |
DISALLOW_COPY_AND_ASSIGN(StubWhispernetClient); |
}; |