| 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 that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/midi/midi_manager_usb.h" | 5 #include "media/midi/midi_manager_usb.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 ~FakeMidiManagerClient() override {} | 79 ~FakeMidiManagerClient() override {} |
| 80 | 80 |
| 81 void AddInputPort(const MidiPortInfo& info) override { | 81 void AddInputPort(const MidiPortInfo& info) override { |
| 82 input_ports_.push_back(info); | 82 input_ports_.push_back(info); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void AddOutputPort(const MidiPortInfo& info) override { | 85 void AddOutputPort(const MidiPortInfo& info) override { |
| 86 output_ports_.push_back(info); | 86 output_ports_.push_back(info); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void SetInputPortState(uint32 port_index, bool connected) override {} |
| 90 |
| 91 void SetOutputPortState(uint32 port_index, bool connected) override {} |
| 92 |
| 89 void CompleteStartSession(MidiResult result) override { | 93 void CompleteStartSession(MidiResult result) override { |
| 90 complete_start_session_ = true; | 94 complete_start_session_ = true; |
| 91 result_ = result; | 95 result_ = result; |
| 92 } | 96 } |
| 93 | 97 |
| 94 void ReceiveMidiData(uint32 port_index, | 98 void ReceiveMidiData(uint32 port_index, |
| 95 const uint8* data, | 99 const uint8* data, |
| 96 size_t size, | 100 size_t size, |
| 97 double timestamp) override { | 101 double timestamp) override { |
| 98 logger_->AddLog("MidiManagerClient::ReceiveMidiData "); | 102 logger_->AddLog("MidiManagerClient::ReceiveMidiData "); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 "data = 0x90 0x45 0x7f\n" | 364 "data = 0x90 0x45 0x7f\n" |
| 361 "MidiManagerClient::ReceiveMidiData port_index = 0 " | 365 "MidiManagerClient::ReceiveMidiData port_index = 0 " |
| 362 "data = 0xf0 0x00 0x01\n" | 366 "data = 0xf0 0x00 0x01\n" |
| 363 "MidiManagerClient::ReceiveMidiData port_index = 0 data = 0xf7\n", | 367 "MidiManagerClient::ReceiveMidiData port_index = 0 data = 0xf7\n", |
| 364 logger_.TakeLog()); | 368 logger_.TakeLog()); |
| 365 } | 369 } |
| 366 | 370 |
| 367 } // namespace | 371 } // namespace |
| 368 | 372 |
| 369 } // namespace media | 373 } // namespace media |
| OLD | NEW |