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

Unified Diff: components/copresence/test/stub_whispernet_client.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/test/stub_whispernet_client.h
diff --git a/components/copresence/test/stub_whispernet_client.h b/components/copresence/test/stub_whispernet_client.h
index 6975e76ba215e47f787670907135275db3a99659..824ac853db8769177c53f9d64a933d4c14b04cd8 100644
--- a/components/copresence/test/stub_whispernet_client.h
+++ b/components/copresence/test/stub_whispernet_client.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_COPRESENCE_TEST_STUB_WHISPERNET_CLIENT_H_
#define COMPONENTS_COPRESENCE_TEST_STUB_WHISPERNET_CLIENT_H_
+#include "base/callback.h"
+
#include "components/copresence/public/whispernet_client.h"
namespace copresence {
@@ -12,25 +14,26 @@ namespace copresence {
// An empty WhispernetClient for testing.
class StubWhispernetClient final : public WhispernetClient {
public:
- StubWhispernetClient() {}
+ StubWhispernetClient();
+ ~StubWhispernetClient() override;
- void Initialize(const SuccessCallback& /* init_callback */) override {}
+ void Initialize(const SuccessCallback& /* init_cb */) override {}
void Shutdown() override {}
- void EncodeToken(const std::string& /* token */, AudioType /* type */)
- override {}
- void DecodeSamples(AudioType /* type */, const std::string& /* samples */)
- override {}
+ void EncodeToken(const std::string& token, AudioType type) override;
+ void DecodeSamples(AudioType type, const std::string& samples) override;
void DetectBroadcast() override {}
- void RegisterTokensCallback(
- const TokensCallback& /* tokens_callback */) override {}
- void RegisterSamplesCallback(
- const SamplesCallback& /* samples_callback */) override {}
+ void RegisterTokensCallback(const TokensCallback& tokens_cb) override;
+ void RegisterSamplesCallback(const SamplesCallback& samples_cb) override;
void RegisterDetectBroadcastCallback(
- const SuccessCallback& /* db_callback */) override {}
+ const SuccessCallback& /* db_cb */) override {}
TokensCallback GetTokensCallback() override;
SamplesCallback GetSamplesCallback() override;
SuccessCallback GetDetectBroadcastCallback() override;
SuccessCallback GetInitializedCallback() override;
+
+ private:
+ TokensCallback tokens_cb_;
+ SamplesCallback samples_cb_;
};
} // namespace copresence

Powered by Google App Engine
This is Rietveld 408576698