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

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

Issue 1345793002: Use complete USB DeviceInfo Mojo object to make permission decisions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manager_full_remove
Patch Set: Rebased. Created 5 years, 3 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_DEVICE_MANAGER_IMPL_H_ 5 #ifndef DEVICE_USB_DEVICE_MANAGER_IMPL_H_
6 #define DEVICE_USB_DEVICE_MANAGER_IMPL_H_ 6 #define DEVICE_USB_DEVICE_MANAGER_IMPL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class ServiceThreadHelper; 54 class ServiceThreadHelper;
55 55
56 // DeviceManager implementation: 56 // DeviceManager implementation:
57 void GetDevices(EnumerationOptionsPtr options, 57 void GetDevices(EnumerationOptionsPtr options,
58 const GetDevicesCallback& callback) override; 58 const GetDevicesCallback& callback) override;
59 void GetDeviceChanges(const GetDeviceChangesCallback& callback) override; 59 void GetDeviceChanges(const GetDeviceChangesCallback& callback) override;
60 void OpenDevice(const mojo::String& guid, 60 void OpenDevice(const mojo::String& guid,
61 mojo::InterfaceRequest<Device> device_request, 61 mojo::InterfaceRequest<Device> device_request,
62 const OpenDeviceCallback& callback) override; 62 const OpenDeviceCallback& callback) override;
63 63
64 void OnGotDeviceInfoForOpen(mojo::InterfaceRequest<Device> device_request,
65 const OpenDeviceCallback& callback,
66 DeviceInfoPtr device_info);
64 void OnOpenDevicePermissionCheckComplete( 67 void OnOpenDevicePermissionCheckComplete(
65 mojo::InterfaceRequest<Device> device_request, 68 mojo::InterfaceRequest<Device> device_request,
66 const OpenDeviceCallback& callback, 69 const OpenDeviceCallback& callback,
67 mojo::Array<mojo::String> allowed_guids); 70 mojo::Array<mojo::String> allowed_guids);
68 71
69 // Callbacks to handle the async responses from the underlying UsbService. 72 // Callbacks to handle the async responses from the underlying UsbService.
70 void OnGetDevices(EnumerationOptionsPtr options, 73 void OnGetDevices(EnumerationOptionsPtr options,
71 const GetDevicesCallback& callback, 74 const GetDevicesCallback& callback,
72 const DeviceList& devices); 75 const DeviceList& devices);
73 76
(...skipping 29 matching lines...) Expand all
103 mojo::Binding<DeviceManager> binding_; 106 mojo::Binding<DeviceManager> binding_;
104 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; 107 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_;
105 108
106 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); 109 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl);
107 }; 110 };
108 111
109 } // namespace usb 112 } // namespace usb
110 } // namespace device 113 } // namespace device
111 114
112 #endif // DEVICE_USB_DEVICE_MANAGER_IMPL_H_ 115 #endif // DEVICE_USB_DEVICE_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/usb/web_usb_permission_provider.cc ('k') | device/devices_app/usb/device_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698