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

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

Issue 1902263004: Mojo: Change the blink variant from "wtf" to "blink". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 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 16 matching lines...) Expand all
27 } 27 }
28 28
29 USBAlternateInterface::USBAlternateInterface(const USBInterface* interface, size _t alternateIndex) 29 USBAlternateInterface::USBAlternateInterface(const USBInterface* interface, size _t alternateIndex)
30 : m_interface(interface) 30 : m_interface(interface)
31 , m_alternateIndex(alternateIndex) 31 , m_alternateIndex(alternateIndex)
32 { 32 {
33 ASSERT(m_interface); 33 ASSERT(m_interface);
34 ASSERT(m_alternateIndex < m_interface->info().alternates.size()); 34 ASSERT(m_alternateIndex < m_interface->info().alternates.size());
35 } 35 }
36 36
37 const device::usb::wtf::AlternateInterfaceInfo& USBAlternateInterface::info() co nst 37 const device::usb::blink::AlternateInterfaceInfo& USBAlternateInterface::info() const
38 { 38 {
39 const device::usb::wtf::InterfaceInfo& interfaceInfo = m_interface->info(); 39 const device::usb::blink::InterfaceInfo& interfaceInfo = m_interface->info() ;
40 ASSERT(m_alternateIndex < interfaceInfo.alternates.size()); 40 ASSERT(m_alternateIndex < interfaceInfo.alternates.size());
41 return *interfaceInfo.alternates[m_alternateIndex]; 41 return *interfaceInfo.alternates[m_alternateIndex];
42 } 42 }
43 43
44 HeapVector<Member<USBEndpoint>> USBAlternateInterface::endpoints() const 44 HeapVector<Member<USBEndpoint>> USBAlternateInterface::endpoints() const
45 { 45 {
46 HeapVector<Member<USBEndpoint>> endpoints; 46 HeapVector<Member<USBEndpoint>> endpoints;
47 for (size_t i = 0; i < info().endpoints.size(); ++i) 47 for (size_t i = 0; i < info().endpoints.size(); ++i)
48 endpoints.append(USBEndpoint::create(this, i)); 48 endpoints.append(USBEndpoint::create(this, i));
49 return endpoints; 49 return endpoints;
50 } 50 }
51 51
52 DEFINE_TRACE(USBAlternateInterface) 52 DEFINE_TRACE(USBAlternateInterface)
53 { 53 {
54 visitor->trace(m_interface); 54 visitor->trace(m_interface);
55 } 55 }
56 56
57 } // namespace blink 57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698