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

Side by Side Diff: third_party/WebKit/Source/modules/webusb/USBInterface.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBDevice.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/USBInterface.h" 5 #include "modules/webusb/USBInterface.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/USBAlternateInterface.h" 9 #include "modules/webusb/USBAlternateInterface.h"
10 #include "modules/webusb/USBConfiguration.h" 10 #include "modules/webusb/USBConfiguration.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 USBAlternateInterface* USBInterface::alternate() const { 52 USBAlternateInterface* USBInterface::alternate() const {
53 if (m_device->isInterfaceClaimed(m_configurationIndex, m_interfaceIndex)) 53 if (m_device->isInterfaceClaimed(m_configurationIndex, m_interfaceIndex))
54 return USBAlternateInterface::create( 54 return USBAlternateInterface::create(
55 this, m_device->selectedAlternateInterface(m_interfaceIndex)); 55 this, m_device->selectedAlternateInterface(m_interfaceIndex));
56 return nullptr; 56 return nullptr;
57 } 57 }
58 58
59 HeapVector<Member<USBAlternateInterface>> USBInterface::alternates() const { 59 HeapVector<Member<USBAlternateInterface>> USBInterface::alternates() const {
60 HeapVector<Member<USBAlternateInterface>> alternates; 60 HeapVector<Member<USBAlternateInterface>> alternates;
61 for (size_t i = 0; i < info().alternates.size(); ++i) 61 for (size_t i = 0; i < info().alternates.size(); ++i)
62 alternates.append(USBAlternateInterface::create(this, i)); 62 alternates.push_back(USBAlternateInterface::create(this, i));
63 return alternates; 63 return alternates;
64 } 64 }
65 65
66 bool USBInterface::claimed() const { 66 bool USBInterface::claimed() const {
67 return m_device->isInterfaceClaimed(m_configurationIndex, m_interfaceIndex); 67 return m_device->isInterfaceClaimed(m_configurationIndex, m_interfaceIndex);
68 } 68 }
69 69
70 DEFINE_TRACE(USBInterface) { 70 DEFINE_TRACE(USBInterface) {
71 visitor->trace(m_device); 71 visitor->trace(m_device);
72 } 72 }
73 73
74 } // namespace blink 74 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698