OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ |
6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ | 6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void set_manufacturer_string(const base::string16& value) { | 54 void set_manufacturer_string(const base::string16& value) { |
55 manufacturer_string_ = value; | 55 manufacturer_string_ = value; |
56 } | 56 } |
57 void set_product_string(const base::string16& value) { | 57 void set_product_string(const base::string16& value) { |
58 product_string_ = value; | 58 product_string_ = value; |
59 } | 59 } |
60 void set_serial_number(const base::string16& value) { | 60 void set_serial_number(const base::string16& value) { |
61 serial_number_ = value; | 61 serial_number_ = value; |
62 } | 62 } |
63 void set_device_path(const std::string& value) { device_path_ = value; } | 63 void set_device_path(const std::string& value) { device_path_ = value; } |
64 void set_webusb_allowed_origins(scoped_ptr<WebUsbDescriptorSet> descriptors) { | 64 void set_webusb_allowed_origins( |
65 webusb_allowed_origins_ = std::move(descriptors); | 65 scoped_ptr<WebUsbAllowedOrigins> allowed_origins) { |
| 66 webusb_allowed_origins_ = std::move(allowed_origins); |
66 } | 67 } |
67 void set_webusb_landing_page(const GURL& url) { webusb_landing_page_ = url; } | 68 void set_webusb_landing_page(const GURL& url) { webusb_landing_page_ = url; } |
68 | 69 |
69 PlatformUsbDevice platform_device() const { return platform_device_; } | 70 PlatformUsbDevice platform_device() const { return platform_device_; } |
70 | 71 |
71 protected: | 72 protected: |
72 friend class UsbServiceImpl; | 73 friend class UsbServiceImpl; |
73 friend class UsbDeviceHandleImpl; | 74 friend class UsbDeviceHandleImpl; |
74 | 75 |
75 // Called by UsbServiceImpl only; | 76 // Called by UsbServiceImpl only; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 126 |
126 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 127 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
127 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 128 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
128 | 129 |
129 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); | 130 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); |
130 }; | 131 }; |
131 | 132 |
132 } // namespace device | 133 } // namespace device |
133 | 134 |
134 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ | 135 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ |
OLD | NEW |