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

Unified Diff: media/midi/midi_manager_usb.cc

Issue 1065743003: Reland: Web MIDI: split build rules for media/midi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed patch set Created 5 years, 8 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 | « media/midi/midi_jni_registrar.cc ('k') | media/midi/midi_manager_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_usb.cc
diff --git a/media/midi/midi_manager_usb.cc b/media/midi/midi_manager_usb.cc
index 346098c5a851f67d262eb5a6475fefc6d8956825..4548a8915fbf2162127dd7e3f2e053f18a4ed26f 100644
--- a/media/midi/midi_manager_usb.cc
+++ b/media/midi/midi_manager_usb.cc
@@ -74,7 +74,7 @@ void MidiManagerUsb::ReceiveUsbMidiData(UsbMidiDevice* device,
}
void MidiManagerUsb::OnDeviceAttached(scoped_ptr<UsbMidiDevice> device) {
- int device_id = devices_.size();
+ int device_id = static_cast<int>(devices_.size());
devices_.push_back(device.release());
AddPorts(devices_.back(), device_id);
}
@@ -86,13 +86,13 @@ void MidiManagerUsb::OnDeviceDetached(size_t index) {
UsbMidiDevice* device = devices_[index];
for (size_t i = 0; i < output_streams_.size(); ++i) {
if (output_streams_[i]->jack().device == device) {
- SetOutputPortState(i, MIDI_PORT_DISCONNECTED);
+ SetOutputPortState(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED);
}
}
const std::vector<UsbMidiJack>& input_jacks = input_stream_->jacks();
for (size_t i = 0; i < input_jacks.size(); ++i) {
if (input_jacks[i].device == device) {
- SetInputPortState(i, MIDI_PORT_DISCONNECTED);
+ SetInputPortState(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED);
}
}
}
@@ -101,7 +101,7 @@ void MidiManagerUsb::OnReceivedData(size_t jack_index,
const uint8* data,
size_t size,
base::TimeTicks time) {
- ReceiveMidiData(jack_index, data, size, time);
+ ReceiveMidiData(static_cast<uint32>(jack_index), data, size, time);
}
@@ -114,7 +114,7 @@ void MidiManagerUsb::OnEnumerateDevicesDone(bool result,
input_stream_.reset(new UsbMidiInputStream(this));
devices->swap(devices_);
for (size_t i = 0; i < devices_.size(); ++i) {
- if (!AddPorts(devices_[i], i)) {
+ if (!AddPorts(devices_[i], static_cast<int>(i))) {
initialize_callback_.Run(MIDI_INITIALIZATION_ERROR);
return;
}
« no previous file with comments | « media/midi/midi_jni_registrar.cc ('k') | media/midi/midi_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698