OLD | NEW |
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_LINUX_H_ | 5 #ifndef DEVICE_HID_HID_SERVICE_LINUX_H_ |
6 #define DEVICE_HID_HID_SERVICE_LINUX_H_ | 6 #define DEVICE_HID_HID_SERVICE_LINUX_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 bool success); | 43 bool success); |
44 #endif // defined(OS_CHROMEOS) | 44 #endif // defined(OS_CHROMEOS) |
45 static void OpenDevice(scoped_ptr<ConnectParams> params); | 45 static void OpenDevice(scoped_ptr<ConnectParams> params); |
46 static void ConnectImpl(scoped_ptr<ConnectParams> params); | 46 static void ConnectImpl(scoped_ptr<ConnectParams> params); |
47 | 47 |
48 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 48 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
49 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 49 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
50 | 50 |
51 // The helper lives on the FILE thread and holds a weak reference back to the | 51 // The helper lives on the FILE thread and holds a weak reference back to the |
52 // service that owns it. | 52 // service that owns it. |
| 53 scoped_ptr<Helper> helper_; |
53 base::WeakPtrFactory<HidServiceLinux> weak_factory_; | 54 base::WeakPtrFactory<HidServiceLinux> weak_factory_; |
54 scoped_ptr<Helper> helper_; | |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(HidServiceLinux); | 56 DISALLOW_COPY_AND_ASSIGN(HidServiceLinux); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace device | 59 } // namespace device |
60 | 60 |
61 #endif // DEVICE_HID_HID_SERVICE_LINUX_H_ | 61 #endif // DEVICE_HID_HID_SERVICE_LINUX_H_ |
OLD | NEW |