OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This class implements content::DevicesMonitor on Linux. |
| 6 |
| 7 #ifndef CONTENT_BROWSER_DEVICES_MONITOR_DEVICES_MONITOR_LINUX_H_ |
| 8 #define CONTENT_BROWSER_DEVICES_MONITOR_DEVICES_MONITOR_LINUX_H_ |
| 9 |
| 10 #include <set> |
| 11 |
| 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "content/browser/devices_monitor/devices_monitor.h" |
| 15 |
| 16 extern "C" { |
| 17 struct udev_device; |
| 18 } |
| 19 |
| 20 namespace content { |
| 21 |
| 22 class UdevLinux; |
| 23 |
| 24 class DevicesMonitorLinux : public DevicesMonitor { |
| 25 public: |
| 26 DevicesMonitorLinux(); |
| 27 virtual ~DevicesMonitorLinux(); |
| 28 |
| 29 virtual void Start(base::SystemMonitor::DevicesChangedObserver*) OVERRIDE; |
| 30 virtual void Stop(base::SystemMonitor::DevicesChangedObserver*) OVERRIDE; |
| 31 |
| 32 private: |
| 33 void OnDevicesChanged(udev_device* device); |
| 34 |
| 35 scoped_ptr<UdevLinux> udev_; |
| 36 std::set<base::SystemMonitor::DevicesChangedObserver*> observers_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(DevicesMonitorLinux); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_BROWSER_DEVICES_MONITOR_DEVICES_MONITOR_LINUX_H_ |
OLD | NEW |