| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/webusb/USBConfiguration.h" | 5 #include "modules/webusb/USBConfiguration.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "device/usb/public/interfaces/device.mojom-blink.h" | 8 #include "device/usb/public/interfaces/device.mojom-blink.h" |
| 9 #include "modules/webusb/USBDevice.h" | 9 #include "modules/webusb/USBDevice.h" |
| 10 #include "modules/webusb/USBInterface.h" | 10 #include "modules/webusb/USBInterface.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return m_configurationIndex; | 43 return m_configurationIndex; |
| 44 } | 44 } |
| 45 | 45 |
| 46 const device::usb::blink::ConfigurationInfo& USBConfiguration::info() const { | 46 const device::usb::blink::ConfigurationInfo& USBConfiguration::info() const { |
| 47 return *m_device->info().configurations[m_configurationIndex]; | 47 return *m_device->info().configurations[m_configurationIndex]; |
| 48 } | 48 } |
| 49 | 49 |
| 50 HeapVector<Member<USBInterface>> USBConfiguration::interfaces() const { | 50 HeapVector<Member<USBInterface>> USBConfiguration::interfaces() const { |
| 51 HeapVector<Member<USBInterface>> interfaces; | 51 HeapVector<Member<USBInterface>> interfaces; |
| 52 for (size_t i = 0; i < info().interfaces.size(); ++i) | 52 for (size_t i = 0; i < info().interfaces.size(); ++i) |
| 53 interfaces.append(USBInterface::create(this, i)); | 53 interfaces.push_back(USBInterface::create(this, i)); |
| 54 return interfaces; | 54 return interfaces; |
| 55 } | 55 } |
| 56 | 56 |
| 57 DEFINE_TRACE(USBConfiguration) { | 57 DEFINE_TRACE(USBConfiguration) { |
| 58 visitor->trace(m_device); | 58 visitor->trace(m_device); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace blink | 61 } // namespace blink |
| OLD | NEW |