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

Side by Side Diff: device/core/device_monitor_win.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 unified diff | Download patch
« no previous file with comments | « device/core/device_monitor_linux.cc ('k') | device/core/device_monitor_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef DEVICE_CORE_DEVICE_MONITOR_WIN_H_
6 #define DEVICE_CORE_DEVICE_MONITOR_WIN_H_
7
8 #include <windows.h>
9
10 #include "base/observer_list.h"
11 #include "device/core/device_core_export.h"
12
13 namespace device {
14
15 // Use an instance of this class to observe devices being added and removed
16 // from the system, matched by device interface GUID.
17 class DEVICE_CORE_EXPORT DeviceMonitorWin {
18 public:
19 class DEVICE_CORE_EXPORT Observer {
20 public:
21 virtual void OnDeviceAdded(const GUID& class_guid,
22 const std::string& device_path);
23 virtual void OnDeviceRemoved(const GUID& class_guid,
24 const std::string& device_path);
25 };
26
27 ~DeviceMonitorWin();
28
29 static DeviceMonitorWin* GetForDeviceInterface(const GUID& guid);
30 static DeviceMonitorWin* GetForAllInterfaces();
31
32 void AddObserver(Observer* observer);
33 void RemoveObserver(Observer* observer);
34
35 private:
36 friend class DeviceMonitorMessageWindow;
37
38 DeviceMonitorWin();
39
40 void NotifyDeviceAdded(const GUID& class_guid,
41 const std::string& device_path);
42 void NotifyDeviceRemoved(const GUID& class_guid,
43 const std::string& device_path);
44
45 base::ObserverList<Observer> observer_list_;
46 };
47
48 } // namespace device
49
50 #endif // DEVICE_CORE_DEVICE_MONITOR_WIN_H_
OLDNEW
« no previous file with comments | « device/core/device_monitor_linux.cc ('k') | device/core/device_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698