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

Side by Side Diff: device/hid/hid_connection_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_connection_linux.cc ('k') | 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/IOHIDManager.h>
10 10
11 #include <queue> 11 #include <queue>
12 12
13 #include "base/mac/foundation_util.h" 13 #include "base/mac/foundation_util.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "device/hid/hid_connection.h" 15 #include "device/hid/hid_connection.h"
16 16
17 namespace base { 17 namespace base {
18 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 class IOBuffer; 22 class IOBuffer;
23 } 23 }
24 24
25 namespace device { 25 namespace device {
26 26
27 class HidConnectionMac : public HidConnection { 27 class HidConnectionMac : public HidConnection {
28 public: 28 public:
29 explicit HidConnectionMac( 29 HidConnectionMac(
30 IOHIDDeviceRef device, 30 IOHIDDeviceRef device,
31 HidDeviceInfo device_info, 31 scoped_refptr<HidDeviceInfo> device_info,
32 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); 32 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
33 33
34 private: 34 private:
35 ~HidConnectionMac() override; 35 ~HidConnectionMac() override;
36 36
37 // HidConnection implementation. 37 // HidConnection implementation.
38 void PlatformClose() override; 38 void PlatformClose() override;
39 void PlatformRead(const ReadCallback& callback) override; 39 void PlatformRead(const ReadCallback& callback) override;
40 void PlatformWrite(scoped_refptr<net::IOBuffer> buffer, 40 void PlatformWrite(scoped_refptr<net::IOBuffer> buffer,
41 size_t size, 41 size_t size,
(...skipping 27 matching lines...) Expand all
69 69
70 std::queue<PendingHidReport> pending_reports_; 70 std::queue<PendingHidReport> pending_reports_;
71 std::queue<PendingHidRead> pending_reads_; 71 std::queue<PendingHidRead> pending_reads_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac); 73 DISALLOW_COPY_AND_ASSIGN(HidConnectionMac);
74 }; 74 };
75 75
76 } // namespace device 76 } // namespace device
77 77
78 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_ 78 #endif // DEVICE_HID_HID_CONNECTION_MAC_H_
OLDNEW
« no previous file with comments | « device/hid/hid_connection_linux.cc ('k') | device/hid/hid_connection_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698