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

Unified Diff: media/midi/midi_manager_usb.cc

Issue 1085843003: Revert of Web MIDI: split build rules for media/midi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 71b81abcabb5370ed15e64cf8042b290dd90fac2..cefbc1aac35c7865afb2be47f52701d7e5629f5b 100644
--- a/media/midi/midi_manager_usb.cc
+++ b/media/midi/midi_manager_usb.cc
@@ -74,7 +74,7 @@
}
void MidiManagerUsb::OnDeviceAttached(scoped_ptr<UsbMidiDevice> device) {
- int device_id = static_cast<int>(devices_.size());
+ int device_id = devices_.size();
devices_.push_back(device.release());
AddPorts(devices_.back(), device_id);
}
@@ -86,13 +86,13 @@
UsbMidiDevice* device = devices_[index];
for (size_t i = 0; i < output_streams_.size(); ++i) {
if (output_streams_[i]->jack().device == device) {
- SetOutputPortState(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED);
+ SetOutputPortState(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(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED);
+ SetInputPortState(i, MIDI_PORT_DISCONNECTED);
}
}
}
@@ -101,7 +101,7 @@
const uint8* data,
size_t size,
base::TimeTicks time) {
- ReceiveMidiData(static_cast<uint32>(jack_index), data, size, time);
+ ReceiveMidiData(jack_index, data, size, time);
}
@@ -114,7 +114,7 @@
input_stream_.reset(new UsbMidiInputStream(this));
devices->swap(devices_);
for (size_t i = 0; i < devices_.size(); ++i) {
- if (!AddPorts(devices_[i], static_cast<int>(i))) {
+ if (!AddPorts(devices_[i], 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