Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: content/browser/device_monitor_mac.h

Issue 10824162: add device notification to Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete the monitors before system_monitor_ in browser_main_loop_. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/device_monitor_mac.h
diff --git a/content/browser/device_monitor_mac.h b/content/browser/device_monitor_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..d7b2dd5fc51829aeeb9ab4fade202b11b79b5525
--- /dev/null
+++ b/content/browser/device_monitor_mac.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_
+#define CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_
+
+#include <IOKit/IOKitLib.h>
+
+#include "base/basictypes.h"
+#include "base/system_monitor/system_monitor.h"
+
+namespace content {
+
+class DeviceMonitorMac {
+ public:
+ DeviceMonitorMac();
+ ~DeviceMonitorMac();
+
+ private:
+ void RegisterVideoCallbacks();
+ void RegisterAudioCallbacks();
+
+ static void VideoDeviceChangedCallback(void *context, io_iterator_t devices);
+ static void AudioDeviceChangedCallback(void *context, io_iterator_t devices);
+
+ void NotifyDeviceChanged(base::SystemMonitor::DeviceType type);
+
+ IONotificationPortRef notification_port_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698