Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_ | |
| 6 #define COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_ | |
| 7 | |
| 8 #include <queue> | |
|
xiyuan
2014/07/25 21:02:09
nit: not used?
rkc
2014/07/28 21:02:02
Done.
| |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/callback.h" | |
| 12 #include "base/macros.h" | |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "components/copresence/handlers/audio/audio_directive_list.h" | |
| 15 #include "components/copresence/mediums/audio/audio_recorder.h" | |
| 16 | |
| 17 namespace copresence { | |
| 18 class Directive; | |
| 19 } | |
| 20 | |
| 21 namespace copresence { | |
| 22 | |
| 23 class AudioDirectiveHandler; | |
| 24 | |
| 25 // The directive handler manages transmit and receive directives given to it | |
| 26 // by the client. | |
| 27 class DirectiveHandler { | |
| 28 public: | |
| 29 DirectiveHandler(const AudioRecorder::DecodeSamplesCallback& decode_cb, | |
| 30 const AudioDirectiveList::EncodeTokenCallback& encode_cb); | |
| 31 virtual ~DirectiveHandler(); | |
|
xiyuan
2014/07/25 21:02:09
nit: No need to be "virtual" if the class is not i
rkc
2014/07/28 21:02:02
Done.
| |
| 32 | |
| 33 // Adds a directive to handle. | |
| 34 void AddDirective(const copresence::Directive& directive); | |
| 35 // Removes any directives associated with the given operation id. | |
| 36 void RemoveDirectives(const std::string& op_id); | |
| 37 | |
| 38 private: | |
| 39 // Audio: | |
|
Daniel Erat
2014/07/28 21:18:17
nit: delete unnecessary comment
rkc
2014/07/29 00:33:35
Done.
| |
| 40 scoped_ptr<AudioDirectiveHandler> audio_handler_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(DirectiveHandler); | |
| 43 }; | |
| 44 | |
| 45 } // namespace copresence | |
| 46 | |
| 47 #endif // COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_ | |
| OLD | NEW |