Index: base/system_monitor/system_monitor.cc |
=================================================================== |
--- base/system_monitor/system_monitor.cc (revision 147551) |
+++ base/system_monitor/system_monitor.cc (working copy) |
@@ -6,10 +6,10 @@ |
#include <utility> |
-#include "base/file_path.h" |
#include "base/logging.h" |
#include "base/message_loop.h" |
#include "base/time.h" |
+#include "base/utf_string_conversions.h" |
namespace base { |
@@ -86,14 +86,17 @@ |
NotifyDevicesChanged(); |
} |
-void SystemMonitor::ProcessMediaDeviceAttached(const DeviceIdType& id, |
- const std::string& name, |
- const FilePath& path) { |
- media_device_map_.insert(std::make_pair(id, MakeTuple(id, name, path))); |
- NotifyMediaDeviceAttached(id, name, path); |
+void SystemMonitor::ProcessMediaDeviceAttached( |
+ const std::string& id, |
+ const string16& name, |
+ MediaDeviceType type, |
+ const FilePath::StringType& location) { |
+ MediaDeviceInfo info(id, name, type, location); |
+ media_device_map_.insert(std::make_pair(id, info)); |
vandebo (ex-Chrome)
2012/07/20 00:27:41
As estade raised yesterday, we should probably loo
Lei Zhang
2012/07/20 00:46:25
Done.
|
+ NotifyMediaDeviceAttached(id, name, type, location); |
} |
-void SystemMonitor::ProcessMediaDeviceDetached(const DeviceIdType& id) { |
+void SystemMonitor::ProcessMediaDeviceDetached(const std::string& id) { |
MediaDeviceMap::iterator it = media_device_map_.find(id); |
if (it != media_device_map_.end()) |
media_device_map_.erase(it); |
@@ -133,15 +136,18 @@ |
&DevicesChangedObserver::OnDevicesChanged); |
} |
-void SystemMonitor::NotifyMediaDeviceAttached(const DeviceIdType& id, |
- const std::string& name, |
- const FilePath& path) { |
- DVLOG(1) << "MediaDeviceAttached with name " << name << " and id " << id; |
+void SystemMonitor::NotifyMediaDeviceAttached( |
+ const std::string& id, |
+ const string16& name, |
+ MediaDeviceType type, |
+ const FilePath::StringType& location) { |
+ DVLOG(1) << "MediaDeviceAttached with name " << UTF16ToUTF8(name) |
+ << " and id " << id; |
devices_changed_observer_list_->Notify( |
- &DevicesChangedObserver::OnMediaDeviceAttached, id, name, path); |
+ &DevicesChangedObserver::OnMediaDeviceAttached, id, name, type, location); |
} |
-void SystemMonitor::NotifyMediaDeviceDetached(const DeviceIdType& id) { |
+void SystemMonitor::NotifyMediaDeviceDetached(const std::string& id) { |
DVLOG(1) << "MediaDeviceDetached for id " << id; |
devices_changed_observer_list_->Notify( |
&DevicesChangedObserver::OnMediaDeviceDetached, id); |