summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/device_monitor_mac.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/device_monitor_mac.h')
-rw-r--r--chromium/content/browser/device_monitor_mac.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/content/browser/device_monitor_mac.h b/chromium/content/browser/device_monitor_mac.h
index 6def493a81f..b3d3f9f6dc3 100644
--- a/chromium/content/browser/device_monitor_mac.h
+++ b/chromium/content/browser/device_monitor_mac.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/system_monitor/system_monitor.h"
+#include "base/threading/thread_checker.h"
namespace {
class DeviceMonitorMacImpl;
@@ -22,6 +23,13 @@ class DeviceMonitorMac {
DeviceMonitorMac();
~DeviceMonitorMac();
+ // Registers the observers for the audio/video device removal, connection and
+ // suspension. The AVFoundation library is also loaded and initialised if the
+ // OS supports it. The |device_task_runner| argument represents the thread on
+ // which device enumeration will occur.
+ void StartMonitoring(
+ const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner);
+
// Method called by the internal DeviceMonitorMacImpl object
// |device_monitor_impl_| when a device of type |type| has been added to or
// removed from the system. This code executes in the notification thread
@@ -31,6 +39,10 @@ class DeviceMonitorMac {
private:
scoped_ptr<DeviceMonitorMacImpl> device_monitor_impl_;
+ // |thread_checker_| is used to check that constructor and StartMonitoring()
+ // are called in the correct thread, the UI thread, that also owns the object.
+ base::ThreadChecker thread_checker_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac);
};