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

Side by Side Diff: device/hid/hid_connection_win.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_unittest.cc ('k') | device/hid/hid_connection_win.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_WIN_H_ 5 #ifndef DEVICE_HID_HID_CONNECTION_WIN_H_
6 #define DEVICE_HID_HID_CONNECTION_WIN_H_ 6 #define DEVICE_HID_HID_CONNECTION_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <set> 10 #include <set>
11 11
12 #include "base/win/scoped_handle.h" 12 #include "base/win/scoped_handle.h"
13 #include "device/hid/hid_connection.h" 13 #include "device/hid/hid_connection.h"
14 14
15 namespace device { 15 namespace device {
16 16
17 struct PendingHidTransfer; 17 struct PendingHidTransfer;
18 18
19 class HidConnectionWin : public HidConnection { 19 class HidConnectionWin : public HidConnection {
20 public: 20 public:
21 HidConnectionWin(const HidDeviceInfo& device_info, 21 HidConnectionWin(scoped_refptr<HidDeviceInfo> device_info,
22 base::win::ScopedHandle file); 22 base::win::ScopedHandle file);
23 23
24 private: 24 private:
25 friend class HidServiceWin; 25 friend class HidServiceWin;
26 friend struct PendingHidTransfer; 26 friend struct PendingHidTransfer;
27 27
28 ~HidConnectionWin(); 28 ~HidConnectionWin();
29 29
30 // HidConnection implementation. 30 // HidConnection implementation.
31 virtual void PlatformClose() override; 31 virtual void PlatformClose() override;
(...skipping 23 matching lines...) Expand all
55 base::win::ScopedHandle file_; 55 base::win::ScopedHandle file_;
56 56
57 std::set<scoped_refptr<PendingHidTransfer> > transfers_; 57 std::set<scoped_refptr<PendingHidTransfer> > transfers_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(HidConnectionWin); 59 DISALLOW_COPY_AND_ASSIGN(HidConnectionWin);
60 }; 60 };
61 61
62 } // namespace device 62 } // namespace device
63 63
64 #endif // DEVICE_HID_HID_CONNECTION_WIN_H_ 64 #endif // DEVICE_HID_HID_CONNECTION_WIN_H_
OLDNEW
« no previous file with comments | « device/hid/hid_connection_unittest.cc ('k') | device/hid/hid_connection_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698