OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // libudev is used for monitoring device changes. | 5 // libudev is used for monitoring device changes. |
6 | 6 |
7 #include "content/browser/device_monitor_udev.h" | 7 #include "content/browser/device_monitor_udev.h" |
8 | 8 |
| 9 #include <stddef.h> |
| 10 |
9 #include <string> | 11 #include <string> |
10 | 12 |
| 13 #include "base/macros.h" |
11 #include "base/system_monitor/system_monitor.h" | 14 #include "base/system_monitor/system_monitor.h" |
12 #include "content/browser/udev_linux.h" | 15 #include "content/browser/udev_linux.h" |
13 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
14 #include "device/udev_linux/udev.h" | 17 #include "device/udev_linux/udev.h" |
15 | 18 |
16 namespace { | 19 namespace { |
17 | 20 |
18 struct SubsystemMap { | 21 struct SubsystemMap { |
19 base::SystemMonitor::DeviceType device_type; | 22 base::SystemMonitor::DeviceType device_type; |
20 const char* subsystem; | 23 const char* subsystem; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 device_type = kSubsystemMap[i].device_type; | 80 device_type = kSubsystemMap[i].device_type; |
78 break; | 81 break; |
79 } | 82 } |
80 } | 83 } |
81 DCHECK_NE(device_type, base::SystemMonitor::DEVTYPE_UNKNOWN); | 84 DCHECK_NE(device_type, base::SystemMonitor::DEVTYPE_UNKNOWN); |
82 | 85 |
83 base::SystemMonitor::Get()->ProcessDevicesChanged(device_type); | 86 base::SystemMonitor::Get()->ProcessDevicesChanged(device_type); |
84 } | 87 } |
85 | 88 |
86 } // namespace content | 89 } // namespace content |
OLD | NEW |