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

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

Issue 2821723002: Move classes in the device.usb Mojo namespace to device.mojom (Closed)
Patch Set: mcasas@ nits Created 3 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/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 25 matching lines...) Expand all
36 } 36 }
37 37
38 const USBDevice* USBConfiguration::Device() const { 38 const USBDevice* USBConfiguration::Device() const {
39 return device_; 39 return device_;
40 } 40 }
41 41
42 size_t USBConfiguration::Index() const { 42 size_t USBConfiguration::Index() const {
43 return configuration_index_; 43 return configuration_index_;
44 } 44 }
45 45
46 const device::usb::blink::ConfigurationInfo& USBConfiguration::Info() const { 46 const device::mojom::blink::UsbConfigurationInfo& USBConfiguration::Info()
47 const {
47 return *device_->Info().configurations[configuration_index_]; 48 return *device_->Info().configurations[configuration_index_];
48 } 49 }
49 50
50 HeapVector<Member<USBInterface>> USBConfiguration::interfaces() const { 51 HeapVector<Member<USBInterface>> USBConfiguration::interfaces() const {
51 HeapVector<Member<USBInterface>> interfaces; 52 HeapVector<Member<USBInterface>> interfaces;
52 for (size_t i = 0; i < Info().interfaces.size(); ++i) 53 for (size_t i = 0; i < Info().interfaces.size(); ++i)
53 interfaces.push_back(USBInterface::Create(this, i)); 54 interfaces.push_back(USBInterface::Create(this, i));
54 return interfaces; 55 return interfaces;
55 } 56 }
56 57
57 DEFINE_TRACE(USBConfiguration) { 58 DEFINE_TRACE(USBConfiguration) {
58 visitor->Trace(device_); 59 visitor->Trace(device_);
59 } 60 }
60 61
61 } // namespace blink 62 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBConfiguration.h ('k') | third_party/WebKit/Source/modules/webusb/USBDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698