Chromium Code Reviews| Index: components/copresence/handlers/audio/audio_directive_handler_impl.h |
| diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.h b/components/copresence/handlers/audio/audio_directive_handler_impl.h |
| index c9a91499da950d8094b3020c04ad9570d327912c..3850f307984740ff91231824711e73db878c9b38 100644 |
| --- a/components/copresence/handlers/audio/audio_directive_handler_impl.h |
| +++ b/components/copresence/handlers/audio/audio_directive_handler_impl.h |
| @@ -12,6 +12,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/scoped_vector.h" |
| #include "components/copresence/handlers/audio/audio_directive_handler.h" |
| +#include "components/copresence/public/copresence_constants.h" |
| namespace base { |
| class TimeTicks; |
| @@ -36,19 +37,21 @@ class TickClockRefCounted; |
| // of this class. |
| class AudioDirectiveHandlerImpl final : public AudioDirectiveHandler { |
| public: |
| - AudioDirectiveHandlerImpl(); |
| - AudioDirectiveHandlerImpl(scoped_ptr<AudioManager> audio_manager, |
| - scoped_ptr<base::Timer> timer, |
| - const scoped_refptr<TickClockRefCounted>& clock); |
| + explicit AudioDirectiveHandlerImpl( |
| + const DirectivesCallback& update_directives_callback); |
| + AudioDirectiveHandlerImpl( |
| + const DirectivesCallback& update_directives_callback, |
| + scoped_ptr<AudioManager> audio_manager, |
| + scoped_ptr<base::Timer> timer, |
| + const scoped_refptr<TickClockRefCounted>& clock); |
| ~AudioDirectiveHandlerImpl(); |
|
xiyuan
2014/12/18 18:10:52
nit: override?
Charlie
2014/12/19 03:53:33
Done.
|
| // AudioDirectiveHandler overrides: |
| void Initialize(WhispernetClient* whispernet_client, |
| const TokensCallback& tokens_cb) override; |
| - void AddInstruction(const copresence::TokenInstruction& instruction, |
| - const std::string& op_id, |
| - base::TimeDelta ttl) override; |
| + void AddInstruction(const Directive& directive, |
| + const std::string& op_id) override; |
| void RemoveInstructions(const std::string& op_id) override; |
| const std::string PlayingToken(AudioType type) const override; |
| bool IsPlayingTokenHeard(AudioType type) const override; |
| @@ -63,8 +66,8 @@ class AudioDirectiveHandlerImpl final : public AudioDirectiveHandler { |
| // instructions. If we don't have any active instructions, returns false. |
| bool GetNextInstructionExpiry(base::TimeTicks* next_event); |
| + DirectivesCallback update_directives_callback_; |
| scoped_ptr<AudioManager> audio_manager_; |
| - |
| scoped_ptr<base::Timer> audio_event_timer_; |
| scoped_refptr<TickClockRefCounted> clock_; |
| @@ -73,7 +76,6 @@ class AudioDirectiveHandlerImpl final : public AudioDirectiveHandler { |
| ScopedVector<AudioDirectiveList> transmits_lists_; |
| ScopedVector<AudioDirectiveList> receives_lists_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandlerImpl); |
| }; |