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

Side by Side Diff: content/browser/devices_monitor/devices_monitor_linux.h

Issue 10829073: Add DeviceMonitorLinux in BrowserMainLoop. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698