Index: base/system_monitor/system_monitor.cc |
=================================================================== |
--- base/system_monitor/system_monitor.cc (revision 146883) |
+++ 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 { |
@@ -88,11 +88,24 @@ |
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); |
+ MediaDeviceType type, |
+ const string16& data) { |
+ media_device_map_.insert(std::make_pair(id, MakeTuple(id, name, type, data))); |
+ NotifyMediaDeviceAttached(id, name, type, data); |
} |
+#if defined(OS_POSIX) |
+void SystemMonitor::ProcessMediaDeviceAttached(const DeviceIdType& id, |
+ const std::string& name, |
+ MediaDeviceType type, |
+ const std::string& data) { |
+ string16 data16 = UTF8ToUTF16(data); |
+ media_device_map_.insert( |
vandebo (ex-Chrome)
2012/07/19 19:05:20
Call the other ProcessMediaDeviceAttach with the c
Lei Zhang
2012/07/19 23:07:25
I removed this since we switched to FilePath::Stri
|
+ std::make_pair(id, MakeTuple(id, name, type, data16))); |
+ NotifyMediaDeviceAttached(id, name, type, data16); |
+} |
+#endif |
+ |
void SystemMonitor::ProcessMediaDeviceDetached(const DeviceIdType& id) { |
MediaDeviceMap::iterator it = media_device_map_.find(id); |
if (it != media_device_map_.end()) |
@@ -135,10 +148,11 @@ |
void SystemMonitor::NotifyMediaDeviceAttached(const DeviceIdType& id, |
const std::string& name, |
- const FilePath& path) { |
+ MediaDeviceType type, |
+ const string16& data) { |
DVLOG(1) << "MediaDeviceAttached with name " << name << " and id " << id; |
devices_changed_observer_list_->Notify( |
- &DevicesChangedObserver::OnMediaDeviceAttached, id, name, path); |
+ &DevicesChangedObserver::OnMediaDeviceAttached, id, name, type, data); |
} |
void SystemMonitor::NotifyMediaDeviceDetached(const DeviceIdType& id) { |