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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler.h

Issue 665353002: Add AudioDirectiveHandler timed tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: build fix. 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
« no previous file with comments | « components/copresence/BUILD.gn ('k') | components/copresence/handlers/audio/audio_directive_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/handlers/audio/audio_directive_handler.h
diff --git a/components/copresence/handlers/audio/audio_directive_handler.h b/components/copresence/handlers/audio/audio_directive_handler.h
index 54885b9d492abeb351165df24ff3c2f57ccf1dae..fa690b62535bf9aa6721f160495a52ed95e14668 100644
--- a/components/copresence/handlers/audio/audio_directive_handler.h
+++ b/components/copresence/handlers/audio/audio_directive_handler.h
@@ -17,7 +17,6 @@
#include "components/copresence/proto/data.pb.h"
namespace base {
-class TickClock;
class Timer;
}
@@ -27,6 +26,8 @@ class AudioBusRefCounted;
namespace copresence {
+class TickClockRefCounted;
+
// The AudioDirectiveHandler handles audio transmit and receive instructions.
// TODO(rkc): Currently since WhispernetClient can only have one token encoded
// callback at a time, we need to have both the audible and inaudible in this
@@ -60,6 +61,9 @@ class AudioDirectiveHandler final {
audio_manager_ = manager.Pass();
}
+ void set_clock_for_testing(const scoped_refptr<TickClockRefCounted>& clock);
+ void set_timer_for_testing(scoped_ptr<base::Timer> timer);
+
private:
// Processes the next active instruction, updating our audio manager state
// accordingly.
@@ -80,7 +84,7 @@ class AudioDirectiveHandler final {
scoped_ptr<base::Timer> audio_event_timer_;
- scoped_ptr<base::TickClock> clock_;
+ scoped_refptr<TickClockRefCounted> clock_;
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandler);
};
« no previous file with comments | « components/copresence/BUILD.gn ('k') | components/copresence/handlers/audio/audio_directive_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698