| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_CORE_DEVICE_MONITOR_WIN_H_ | 5 #ifndef DEVICE_BASE_DEVICE_MONITOR_WIN_H_ |
| 6 #define DEVICE_CORE_DEVICE_MONITOR_WIN_H_ | 6 #define DEVICE_BASE_DEVICE_MONITOR_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "device/core/device_core_export.h" | 11 #include "device/base/device_base_export.h" |
| 12 | 12 |
| 13 namespace device { | 13 namespace device { |
| 14 | 14 |
| 15 // Use an instance of this class to observe devices being added and removed | 15 // Use an instance of this class to observe devices being added and removed |
| 16 // from the system, matched by device interface GUID. | 16 // from the system, matched by device interface GUID. |
| 17 class DEVICE_CORE_EXPORT DeviceMonitorWin { | 17 class DEVICE_BASE_EXPORT DeviceMonitorWin { |
| 18 public: | 18 public: |
| 19 class DEVICE_CORE_EXPORT Observer { | 19 class DEVICE_BASE_EXPORT Observer { |
| 20 public: | 20 public: |
| 21 virtual void OnDeviceAdded(const GUID& class_guid, | 21 virtual void OnDeviceAdded(const GUID& class_guid, |
| 22 const std::string& device_path); | 22 const std::string& device_path); |
| 23 virtual void OnDeviceRemoved(const GUID& class_guid, | 23 virtual void OnDeviceRemoved(const GUID& class_guid, |
| 24 const std::string& device_path); | 24 const std::string& device_path); |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 ~DeviceMonitorWin(); | 27 ~DeviceMonitorWin(); |
| 28 | 28 |
| 29 static DeviceMonitorWin* GetForDeviceInterface(const GUID& guid); | 29 static DeviceMonitorWin* GetForDeviceInterface(const GUID& guid); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 void NotifyDeviceAdded(const GUID& class_guid, | 40 void NotifyDeviceAdded(const GUID& class_guid, |
| 41 const std::string& device_path); | 41 const std::string& device_path); |
| 42 void NotifyDeviceRemoved(const GUID& class_guid, | 42 void NotifyDeviceRemoved(const GUID& class_guid, |
| 43 const std::string& device_path); | 43 const std::string& device_path); |
| 44 | 44 |
| 45 base::ObserverList<Observer> observer_list_; | 45 base::ObserverList<Observer> observer_list_; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace device | 48 } // namespace device |
| 49 | 49 |
| 50 #endif // DEVICE_CORE_DEVICE_MONITOR_WIN_H_ | 50 #endif // DEVICE_BASE_DEVICE_MONITOR_WIN_H_ |
| OLD | NEW |