OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/udev_linux.h" | 5 #include "content/browser/udev_linux.h" |
6 | 6 |
7 #include <libudev.h> | 7 #include <libudev.h> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 UdevLinux::UdevLinux(const std::vector<UdevMonitorFilter>& filters, | 13 UdevLinux::UdevLinux(const std::vector<UdevMonitorFilter>& filters, |
14 const UdevNotificationCallback& callback) | 14 const UdevNotificationCallback& callback) |
15 : udev_(udev_new()), | 15 : udev_(udev_new()), |
16 monitor_(NULL), | 16 monitor_(NULL), |
17 monitor_fd_(-1), | 17 monitor_fd_(-1), |
18 callback_(callback) { | 18 callback_(callback) { |
19 CHECK(udev_); | 19 CHECK(udev_); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return; | 61 return; |
62 | 62 |
63 callback_.Run(dev); | 63 callback_.Run(dev); |
64 udev_device_unref(dev); | 64 udev_device_unref(dev); |
65 } | 65 } |
66 | 66 |
67 void UdevLinux::OnFileCanWriteWithoutBlocking(int fd) { | 67 void UdevLinux::OnFileCanWriteWithoutBlocking(int fd) { |
68 } | 68 } |
69 | 69 |
70 } // namespace content | 70 } // namespace content |
OLD | NEW |