Chromium Code Reviews| 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 CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ |
| 6 #define CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ | 6 #define CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/system_monitor/system_monitor.h" | 9 #include "base/system_monitor/system_monitor.h" |
| 10 | 10 |
| 11 namespace { | |
| 12 class DeviceMonitorMacImpl; | |
| 13 } | |
| 14 | |
| 11 namespace content { | 15 namespace content { |
| 12 | 16 |
| 17 // Class to track audio/video devices removal or addition via callback to | |
| 18 // base::SystemMonitor ProcessDevicesChanged(). A single object of this class | |
| 19 // is created from the browser main process and lives as long as this one. | |
| 13 class DeviceMonitorMac { | 20 class DeviceMonitorMac { |
| 14 public: | 21 public: |
| 15 DeviceMonitorMac(); | 22 DeviceMonitorMac(); |
| 16 ~DeviceMonitorMac(); | 23 ~DeviceMonitorMac(); |
| 17 | 24 |
| 18 private: | 25 // Method called by the internal MacMonitor object |device_monitor_impl_| when |
|
Robert Sesek
2013/10/22 14:03:50
nit: MacMonitor is now renamed
mcasas
2013/10/22 18:37:42
Done.
| |
| 19 // Forward the notifications to system monitor. | 26 // a device of type |type| has been added to or removed from the system. This |
| 27 // code executes in the notification thread (QTKit or AVFoundation). | |
| 20 void NotifyDeviceChanged(base::SystemMonitor::DeviceType type); | 28 void NotifyDeviceChanged(base::SystemMonitor::DeviceType type); |
| 21 | 29 |
| 22 class QTMonitorImpl; | 30 private: |
| 23 scoped_ptr<DeviceMonitorMac::QTMonitorImpl> qt_monitor_; | 31 scoped_ptr<DeviceMonitorMacImpl> device_monitor_impl_; |
| 32 | |
| 24 DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac); | 33 DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac); |
| 25 }; | 34 }; |
| 26 | 35 |
| 27 } // namespace content | 36 } // namespace content |
| 28 | 37 |
| 29 #endif // CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ | 38 #endif // CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_ |
| OLD | NEW |