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

Side by Side Diff: device/hid/hid_service_mac.h

Issue 825523003: Convert HidDeviceInfo from a struct to a refcounted class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO to remove friend class definitions. Created 5 years, 11 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/hid/hid_service_linux.cc ('k') | device/hid/hid_service_mac.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 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_HID_HID_SERVICE_MAC_H_ 5 #ifndef DEVICE_HID_HID_SERVICE_MAC_H_
6 #define DEVICE_HID_HID_SERVICE_MAC_H_ 6 #define DEVICE_HID_HID_SERVICE_MAC_H_
7 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 #include <IOKit/IOKitLib.h> 9 #include <IOKit/IOKitLib.h>
10 10
(...skipping 22 matching lines...) Expand all
33 private: 33 private:
34 ~HidServiceMac() override; 34 ~HidServiceMac() override;
35 35
36 // IOService matching callbacks. 36 // IOService matching callbacks.
37 static void FirstMatchCallback(void* context, io_iterator_t iterator); 37 static void FirstMatchCallback(void* context, io_iterator_t iterator);
38 static void TerminatedCallback(void* context, io_iterator_t iterator); 38 static void TerminatedCallback(void* context, io_iterator_t iterator);
39 39
40 void AddDevices(); 40 void AddDevices();
41 void RemoveDevices(); 41 void RemoveDevices();
42 42
43 static scoped_refptr<device::HidDeviceInfo> CreateDeviceInfo(
44 io_service_t device);
45
43 // Platform notification port. 46 // Platform notification port.
44 IONotificationPortRef notify_port_; 47 IONotificationPortRef notify_port_;
45 base::mac::ScopedIOObject<io_iterator_t> devices_added_iterator_; 48 base::mac::ScopedIOObject<io_iterator_t> devices_added_iterator_;
46 base::mac::ScopedIOObject<io_iterator_t> devices_removed_iterator_; 49 base::mac::ScopedIOObject<io_iterator_t> devices_removed_iterator_;
47 50
48 // The task runner for the thread on which this service was created. 51 // The task runner for the thread on which this service was created.
49 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 52 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
50 53
51 // The task runner for the FILE thread of the application using this service 54 // The task runner for the FILE thread of the application using this service
52 // on which slow running I/O operations can be performed. 55 // on which slow running I/O operations can be performed.
53 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 56 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(HidServiceMac); 58 DISALLOW_COPY_AND_ASSIGN(HidServiceMac);
56 }; 59 };
57 60
58 } // namespace device 61 } // namespace device
59 62
60 #endif // DEVICE_HID_HID_SERVICE_MAC_H_ 63 #endif // DEVICE_HID_HID_SERVICE_MAC_H_
OLDNEW
« no previous file with comments | « device/hid/hid_service_linux.cc ('k') | device/hid/hid_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698