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

Unified Diff: device/core/device_monitor_linux.h

Issue 2417043002: Move device/core files to device/base directory. (Closed)
Patch Set: Fix ChromeOS build Created 4 years, 2 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
« no previous file with comments | « device/core/device_info_query_win.cc ('k') | device/core/device_monitor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/core/device_monitor_linux.h
diff --git a/device/core/device_monitor_linux.h b/device/core/device_monitor_linux.h
deleted file mode 100644
index 6cc64e7a18fc0e2de918de08975f249fa9af0e2c..0000000000000000000000000000000000000000
--- a/device/core/device_monitor_linux.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2014 The Chromium 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 DEVICE_HID_DEVICE_MONITOR_LINUX_H_
-#define DEVICE_HID_DEVICE_MONITOR_LINUX_H_
-
-#include <memory>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/files/file_descriptor_watcher_posix.h"
-#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
-#include "base/observer_list.h"
-#include "base/threading/thread_checker.h"
-#include "device/core/device_core_export.h"
-#include "device/udev_linux/scoped_udev.h"
-
-struct udev_device;
-
-namespace device {
-
-// This class listends for notifications from libudev about
-// connected/disconnected devices. This class is *NOT* thread-safe.
-class DEVICE_CORE_EXPORT DeviceMonitorLinux
- : public base::MessageLoop::DestructionObserver {
- public:
- typedef base::Callback<void(udev_device* device)> EnumerateCallback;
-
- class Observer {
- public:
- virtual ~Observer() {}
- virtual void OnDeviceAdded(udev_device* device) = 0;
- virtual void OnDeviceRemoved(udev_device* device) = 0;
- virtual void WillDestroyMonitorMessageLoop() = 0;
- };
-
- DeviceMonitorLinux();
-
- static DeviceMonitorLinux* GetInstance();
-
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- ScopedUdevDevicePtr GetDeviceFromPath(const std::string& path);
- void Enumerate(const EnumerateCallback& callback);
-
- // Implements base::MessageLoop::DestructionObserver
- void WillDestroyCurrentMessageLoop() override;
-
- private:
- friend std::default_delete<DeviceMonitorLinux>;
-
- ~DeviceMonitorLinux() override;
-
- void OnMonitorCanReadWithoutBlocking();
-
- ScopedUdevPtr udev_;
- ScopedUdevMonitorPtr monitor_;
- int monitor_fd_;
- std::unique_ptr<base::FileDescriptorWatcher::Controller>
- monitor_watch_controller_;
-
- base::ObserverList<Observer, true> observers_;
-
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceMonitorLinux);
-};
-
-} // namespace device
-
-#endif // DEVICE_HID_DEVICE_MONITOR_LINUX_H_
« no previous file with comments | « device/core/device_info_query_win.cc ('k') | device/core/device_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698