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

Side by Side Diff: third_party/WebKit/Source/modules/webusb/USBAlternateInterface.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
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/USBAlternateInterface.h" 5 #include "modules/webusb/USBAlternateInterface.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "modules/webusb/USBEndpoint.h" 8 #include "modules/webusb/USBEndpoint.h"
9 #include "modules/webusb/USBInterface.h" 9 #include "modules/webusb/USBInterface.h"
10 10
(...skipping 28 matching lines...) Expand all
39 const device::usb::blink::AlternateInterfaceInfo& USBAlternateInterface::info() 39 const device::usb::blink::AlternateInterfaceInfo& USBAlternateInterface::info()
40 const { 40 const {
41 const device::usb::blink::InterfaceInfo& interfaceInfo = m_interface->info(); 41 const device::usb::blink::InterfaceInfo& interfaceInfo = m_interface->info();
42 ASSERT(m_alternateIndex < interfaceInfo.alternates.size()); 42 ASSERT(m_alternateIndex < interfaceInfo.alternates.size());
43 return *interfaceInfo.alternates[m_alternateIndex]; 43 return *interfaceInfo.alternates[m_alternateIndex];
44 } 44 }
45 45
46 HeapVector<Member<USBEndpoint>> USBAlternateInterface::endpoints() const { 46 HeapVector<Member<USBEndpoint>> USBAlternateInterface::endpoints() const {
47 HeapVector<Member<USBEndpoint>> endpoints; 47 HeapVector<Member<USBEndpoint>> endpoints;
48 for (size_t i = 0; i < info().endpoints.size(); ++i) 48 for (size_t i = 0; i < info().endpoints.size(); ++i)
49 endpoints.append(USBEndpoint::create(this, i)); 49 endpoints.push_back(USBEndpoint::create(this, i));
50 return endpoints; 50 return endpoints;
51 } 51 }
52 52
53 DEFINE_TRACE(USBAlternateInterface) { 53 DEFINE_TRACE(USBAlternateInterface) {
54 visitor->trace(m_interface); 54 visitor->trace(m_interface);
55 } 55 }
56 56
57 } // namespace blink 57 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USB.cpp ('k') | third_party/WebKit/Source/modules/webusb/USBConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698