OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ | 5 #ifndef BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
6 #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ | 6 #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 DEVTYPE_VIDEO_CAPTURE, // Video capture device, e.g., webcam. | 57 DEVTYPE_VIDEO_CAPTURE, // Video capture device, e.g., webcam. |
58 DEVTYPE_UNKNOWN, // Other devices. | 58 DEVTYPE_UNKNOWN, // Other devices. |
59 }; | 59 }; |
60 | 60 |
61 // Type of location data to identify a currently attached media device. | 61 // Type of location data to identify a currently attached media device. |
62 enum MediaDeviceType { | 62 enum MediaDeviceType { |
63 TYPE_PATH, // FilePath::StringType, e.g. a mount point. | 63 TYPE_PATH, // FilePath::StringType, e.g. a mount point. |
64 TYPE_MTP, // (W)string to locate a MTP device, e.g. its usb bus/port. | 64 TYPE_MTP, // (W)string to locate a MTP device, e.g. its usb bus/port. |
65 }; | 65 }; |
66 | 66 |
67 struct MediaDeviceInfo { | 67 struct BASE_EXPORT MediaDeviceInfo { |
68 MediaDeviceInfo(const std::string& id, | 68 MediaDeviceInfo(const std::string& id, |
69 const string16& device_name, | 69 const string16& device_name, |
70 MediaDeviceType device_type, | 70 MediaDeviceType device_type, |
71 const FilePath::StringType& device_location) | 71 const FilePath::StringType& device_location); |
72 : unique_id(id), | |
73 name(device_name), | |
74 type(device_type), | |
75 location(device_location) { | |
76 } | |
77 | 72 |
78 // Unique media device id - persists between device attachments. | 73 // Unique media device id - persists between device attachments. |
79 std::string unique_id; | 74 std::string unique_id; |
80 | 75 |
81 // Human readable media device name. | 76 // Human readable media device name. |
82 string16 name; | 77 string16 name; |
83 | 78 |
84 // Media device type. | 79 // Media device type. |
85 MediaDeviceType type; | 80 MediaDeviceType type; |
86 | 81 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 233 |
239 // Map of all the attached media devices. | 234 // Map of all the attached media devices. |
240 MediaDeviceMap media_device_map_; | 235 MediaDeviceMap media_device_map_; |
241 | 236 |
242 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); | 237 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); |
243 }; | 238 }; |
244 | 239 |
245 } // namespace base | 240 } // namespace base |
246 | 241 |
247 #endif // BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ | 242 #endif // BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
OLD | NEW |