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

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

Issue 1925463002: Mojo: Make device/ to not rely on connecton error notification on message loop destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « device/usb/mojo/device_impl.cc ('k') | device/usb/mojo/device_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/scoped_observer.h" 15 #include "base/scoped_observer.h"
16 #include "device/usb/public/interfaces/device_manager.mojom.h" 16 #include "device/usb/public/interfaces/device_manager.mojom.h"
17 #include "device/usb/usb_service.h" 17 #include "device/usb/usb_service.h"
18 #include "mojo/public/cpp/bindings/array.h" 18 #include "mojo/public/cpp/bindings/array.h"
19 #include "mojo/public/cpp/bindings/binding.h"
20 #include "mojo/public/cpp/bindings/interface_request.h" 19 #include "mojo/public/cpp/bindings/interface_request.h"
20 #include "mojo/public/cpp/bindings/strong_binding.h"
21 21
22 namespace base { 22 namespace base {
23 class SequencedTaskRunner; 23 class SequencedTaskRunner;
24 } 24 }
25 25
26 namespace device { 26 namespace device {
27 27
28 class UsbDevice; 28 class UsbDevice;
29 class UsbDeviceFilter; 29 class UsbDeviceFilter;
30 class UsbDeviceHandle; 30 class UsbDeviceHandle;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // next call to GetDeviceChanges. 77 // next call to GetDeviceChanges.
78 std::queue<GetDeviceChangesCallback> device_change_callbacks_; 78 std::queue<GetDeviceChangesCallback> device_change_callbacks_;
79 std::map<std::string, DeviceInfoPtr> devices_added_; 79 std::map<std::string, DeviceInfoPtr> devices_added_;
80 std::vector<DeviceInfoPtr> devices_removed_; 80 std::vector<DeviceInfoPtr> devices_removed_;
81 81
82 UsbService* usb_service_; 82 UsbService* usb_service_;
83 ScopedObserver<UsbService, UsbService::Observer> observer_; 83 ScopedObserver<UsbService, UsbService::Observer> observer_;
84 84
85 mojo::Closure connection_error_handler_; 85 mojo::Closure connection_error_handler_;
86 86
87 mojo::Binding<DeviceManager> binding_; 87 mojo::StrongBinding<DeviceManager> binding_;
88 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; 88 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); 90 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl);
91 }; 91 };
92 92
93 } // namespace usb 93 } // namespace usb
94 } // namespace device 94 } // namespace device
95 95
96 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ 96 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « device/usb/mojo/device_impl.cc ('k') | device/usb/mojo/device_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698