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

Unified Diff: udev_controller.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 side-by-side diff with in-line comments
Download patch
Index: udev_controller.h
diff --git a/udev_controller.h b/udev_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..712ef4df134a16b61f587fc177554da027f53498
--- /dev/null
+++ b/udev_controller.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef POWER_MANAGER_UDEV_CONTROLLER_H_
+#define POWER_MANAGER_UDEV_CONTROLLER_H_
+
+#include <glib.h>
+#include <libudev.h>
+#include <string>
tfarina 2011/04/15 15:00:37 please, add a line between libudev.h and string.
marcheu 2011/04/15 17:32:23 Done.
+
+#include "base/basictypes.h"
+
+namespace power_manager {
+
+class UdevDelegate {
+ public:
+ virtual ~UdevDelegate() {}
+ virtual void Run(GIOChannel* source, GIOCondition condition) = 0;
+};
+
+class UdevController {
+ public:
+ UdevController(UdevDelegate* delegate, const std::string& subsystem);
+ ~UdevController();
+ bool Init();
tfarina 2011/04/15 15:00:37 please add a line above.
marcheu 2011/04/15 17:32:23 Done.
+
+ private:
+ static gboolean EventHandler(GIOChannel* source,
+ GIOCondition condition,
+ gpointer data);
+
+ // Delegate for udev event; not owned.
+ UdevDelegate* delegate_;
+
+ struct udev_monitor* monitor_;
+ struct udev* udev_;
+ std::string subsystem_;
tfarina 2011/04/15 15:00:37 I'd suggest moving this to line 35 (so it matches
marcheu 2011/04/15 17:32:23 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(UdevController);
+};
+
+} // namespace power_manager
+
+#endif // POWER_MANAGER_UDEV_CONTROLLER_H_
« resolution_selector.h ('K') | « resolution_selector_unittest.cc ('k') | udev_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698