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

Side by Side Diff: device/usb/mojo/device_manager_impl.h

Issue 2234443002: Mojo C++ binding: make device/usb mojom targets use STD string/vector types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the vector converter into a private header. Created 4 years, 4 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 #ifndef DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ 5 #ifndef DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_
6 #define DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ 6 #define DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ~DeviceManagerImpl() override; 47 ~DeviceManagerImpl() override;
48 48
49 void set_connection_error_handler(const base::Closure& error_handler) { 49 void set_connection_error_handler(const base::Closure& error_handler) {
50 connection_error_handler_ = error_handler; 50 connection_error_handler_ = error_handler;
51 } 51 }
52 52
53 private: 53 private:
54 // DeviceManager implementation: 54 // DeviceManager implementation:
55 void GetDevices(EnumerationOptionsPtr options, 55 void GetDevices(EnumerationOptionsPtr options,
56 const GetDevicesCallback& callback) override; 56 const GetDevicesCallback& callback) override;
57 void GetDevice(const mojo::String& guid, 57 void GetDevice(const std::string& guid,
58 mojo::InterfaceRequest<Device> device_request) override; 58 mojo::InterfaceRequest<Device> device_request) override;
59 void SetClient(DeviceManagerClientPtr client) override; 59 void SetClient(DeviceManagerClientPtr client) override;
60 60
61 // Callbacks to handle the async responses from the underlying UsbService. 61 // Callbacks to handle the async responses from the underlying UsbService.
62 void OnGetDevices(EnumerationOptionsPtr options, 62 void OnGetDevices(EnumerationOptionsPtr options,
63 const GetDevicesCallback& callback, 63 const GetDevicesCallback& callback,
64 const std::vector<scoped_refptr<UsbDevice>>& devices); 64 const std::vector<scoped_refptr<UsbDevice>>& devices);
65 65
66 // UsbService::Observer implementation: 66 // UsbService::Observer implementation:
67 void OnDeviceAdded(scoped_refptr<UsbDevice> device) override; 67 void OnDeviceAdded(scoped_refptr<UsbDevice> device) override;
(...skipping 13 matching lines...) Expand all
81 mojo::StrongBinding<DeviceManager> binding_; 81 mojo::StrongBinding<DeviceManager> binding_;
82 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; 82 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); 84 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl);
85 }; 85 };
86 86
87 } // namespace usb 87 } // namespace usb
88 } // namespace device 88 } // namespace device
89 89
90 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ 90 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698