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

Unified Diff: media/midi/midi_manager_usb.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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
Index: media/midi/midi_manager_usb.cc
diff --git a/media/midi/midi_manager_usb.cc b/media/midi/midi_manager_usb.cc
index 9e4778c3b39f7ae6126ab2572ec78a6574e50e48..9dd93f4271dbd6db2911f0c940b5f39bd561d70b 100644
--- a/media/midi/midi_manager_usb.cc
+++ b/media/midi/midi_manager_usb.cc
@@ -37,7 +37,7 @@ void MidiManagerUsb::Initialize(base::Callback<void(Result result)> callback) {
void MidiManagerUsb::DispatchSendMidiData(MidiManagerClient* client,
uint32_t port_index,
- const std::vector<uint8>& data,
+ const std::vector<uint8_t>& data,
double timestamp) {
if (port_index >= output_streams_.size()) {
// |port_index| is provided by a renderer so we can't believe that it is
@@ -55,7 +55,7 @@ void MidiManagerUsb::DispatchSendMidiData(MidiManagerClient* client,
void MidiManagerUsb::ReceiveUsbMidiData(UsbMidiDevice* device,
int endpoint_number,
- const uint8* data,
+ const uint8_t* data,
size_t size,
base::TimeTicks time) {
if (!input_stream_)
@@ -80,22 +80,22 @@ 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(static_cast<uint32>(i), MIDI_PORT_DISCONNECTED);
+ SetOutputPortState(static_cast<uint32_t>(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(static_cast<uint32_t>(i), MIDI_PORT_DISCONNECTED);
}
}
}
void MidiManagerUsb::OnReceivedData(size_t jack_index,
- const uint8* data,
+ const uint8_t* data,
size_t size,
base::TimeTicks time) {
- ReceiveMidiData(static_cast<uint32>(jack_index), data, size, time);
+ ReceiveMidiData(static_cast<uint32_t>(jack_index), data, size, time);
}
@@ -118,8 +118,8 @@ void MidiManagerUsb::OnEnumerateDevicesDone(bool result,
bool MidiManagerUsb::AddPorts(UsbMidiDevice* device, int device_id) {
UsbMidiDescriptorParser parser;
- std::vector<uint8> descriptor = device->GetDescriptors();
- const uint8* data = descriptor.size() > 0 ? &descriptor[0] : NULL;
+ std::vector<uint8_t> descriptor = device->GetDescriptors();
+ const uint8_t* data = descriptor.size() > 0 ? &descriptor[0] : NULL;
std::vector<UsbMidiJack> jacks;
bool parse_result = parser.Parse(device,
data,

Powered by Google App Engine
This is Rietveld 408576698