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

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

Issue 2780393006: Open IOHIDDevices on the FILE thread (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | device/hid/hid_connection_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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_CONNECTION_MAC_H_ 5 #ifndef DEVICE_HID_HID_CONNECTION_MAC_H_
6 #define DEVICE_HID_HID_CONNECTION_MAC_H_ 6 #define DEVICE_HID_HID_CONNECTION_MAC_H_
7 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 #include <IOKit/hid/IOHIDManager.h> 9 #include <IOKit/hid/IOHIDDevice.h>
10 #include <stddef.h> 10 #include <stddef.h>
11 #include <stdint.h> 11 #include <stdint.h>
12 12
13 #include <queue> 13 #include <queue>
14 14
15 #include "base/mac/foundation_util.h" 15 #include "base/mac/foundation_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "device/hid/hid_connection.h" 17 #include "device/hid/hid_connection.h"
18 18
19 namespace base { 19 namespace base {
20 class SingleThreadTaskRunner; 20 class SingleThreadTaskRunner;
21 } 21 }
22 22
23 namespace net { 23 namespace net {
24 class IOBuffer; 24 class IOBuffer;
25 } 25 }
26 26
27 namespace device { 27 namespace device {
28 28
29 class HidConnectionMac : public HidConnection { 29 class HidConnectionMac : public HidConnection {
30 public: 30 public:
31 HidConnectionMac( 31 HidConnectionMac(
32 IOHIDDeviceRef device, 32 base::ScopedCFTypeRef<IOHIDDeviceRef> device,
33 scoped_refptr<HidDeviceInfo> device_info, 33 scoped_refptr<HidDeviceInfo> device_info,
34 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); 34 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
35 35
36 private: 36 private:
37 ~HidConnectionMac() override; 37 ~HidConnectionMac() override;
38 38
39 // HidConnection implementation. 39 // HidConnection implementation.
40 void PlatformClose() override; 40 void PlatformClose() override;
41 void PlatformRead(const ReadCallback& callback) override; 41 void PlatformRead(const ReadCallback& callback) override;
42 void PlatformWrite(scoped_refptr<net::IOBuffer> buffer, 42 void PlatformWrite(scoped_refptr<net::IOBuffer> buffer,
(...skipping 28 matching lines...) Expand all
71 71
72 std::queue<PendingHidReport> pending_reports_; 72 std::queue<PendingHidReport> pending_reports_;
73 std::queue<PendingHidRead> pending_reads_; 73 std::queue<PendingHidRead> pending_reads_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac); 75 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac);
76 }; 76 };
77 77
78 } // namespace device 78 } // namespace device
79 79
80 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_ 80 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | device/hid/hid_connection_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698