Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license |
| 3 // found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/copresence/handlers/directive_handler.h" | 5 #include "components/copresence/handlers/directive_handler.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "components/copresence/handlers/audio/audio_directive_handler.h" | 8 #include "components/copresence/handlers/audio/audio_directive_handler.h" |
| 9 #include "components/copresence/proto/data.pb.h" | 9 #include "components/copresence/proto/data.pb.h" |
| 10 | 10 |
| 11 namespace copresence { | 11 namespace copresence { |
| 12 | 12 |
| 13 DirectiveHandler::DirectiveHandler( | 13 DirectiveHandler::DirectiveHandler( |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 28 // We currently only support audio. | 28 // We currently only support audio. |
| 29 DCHECK_EQ(ti.medium(), AUDIO_ULTRASOUND_PASSBAND); | 29 DCHECK_EQ(ti.medium(), AUDIO_ULTRASOUND_PASSBAND); |
| 30 audio_handler_->AddInstruction( | 30 audio_handler_->AddInstruction( |
| 31 ti, base::TimeDelta::FromMilliseconds(directive.ttl_millis())); | 31 ti, base::TimeDelta::FromMilliseconds(directive.ttl_millis())); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void DirectiveHandler::RemoveDirectives(const std::string& /* op_id */) { | 34 void DirectiveHandler::RemoveDirectives(const std::string& /* op_id */) { |
| 35 // TODO(rkc): Forward the remove directive call to all the directive handlers. | 35 // TODO(rkc): Forward the remove directive call to all the directive handlers. |
| 36 } | 36 } |
| 37 | 37 |
| 38 // Protected | |
| 39 | |
| 40 DirectiveHandler::DirectiveHandler() { | |
|
Daniel Erat
2014/08/06 00:44:46
this leaves the object in a state where methods wi
Charlie
2014/08/06 19:32:18
Not sure I understand - FakeDirectiveHandler is th
| |
| 41 } | |
| 42 | |
| 38 } // namespace copresence | 43 } // namespace copresence |
| OLD | NEW |