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

Side by Side Diff: udev_listener.h

Issue 6854002: Merge monitor_reconfigure into powerd. (Closed) Base URL: ssh://gitrw.chromium.org:9222/power_manager.git@master
Patch Set: Round 6 Created 9 years, 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium OS 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 #ifndef POWER_MANAGER_UDEV_LISTENER_H_
6 #define POWER_MANAGER_UDEV_LISTENER_H_
7
8 #include <string>
tfarina 2011/04/14 20:03:57 this should be included after libudev.h since it's
marcheu 2011/04/14 20:41:24 Done.
9
10 #include <glib.h>
11 #include <libudev.h>
12
13 #include "base/basictypes.h"
14
15 namespace power_manager {
16
17 class UdevCallback {
tfarina 2011/04/14 20:03:57 Thinking about this now, I'd rename this to UdevDe
marcheu 2011/04/14 20:41:24 Done.
18 public:
19 virtual ~UdevCallback() {}
20 virtual void Run(GIOChannel* source, GIOCondition condition) = 0;
21 };
22
23 class UdevListener {
tfarina 2011/04/14 20:03:57 And maybe this to UdevController? I know it's list
marcheu 2011/04/14 20:41:24 Done.
24 public:
25 UdevListener(UdevCallback* callback, const std::string& subsystem);
26 ~UdevListener();
27 bool Init();
28
29 private:
30 static gboolean EventHandler(GIOChannel* source,
31 GIOCondition condition,
32 gpointer data);
33
34 // Callback on udev event; not owned.
35 UdevCallback* callback_;
36
37 struct udev_monitor* monitor_;
38 struct udev* udev_;
39 std::string subsystem_;
40
41 DISALLOW_COPY_AND_ASSIGN(UdevListener);
42 };
43
44 } // namespace power_manager
45
46 #endif // POWER_MANAGER_UDEV_LISTENER_H_
OLDNEW
« monitor_reconfigure.h ('K') | « resolution_selector_unittest.cc ('k') | udev_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698