Chromium Code Reviews| Index: content/browser/system_message_window_win.cc |
| diff --git a/content/browser/system_message_window_win.cc b/content/browser/system_message_window_win.cc |
| index d2a7808223c07993701cd63eb76094772dc772c9..07e5827af353d5212430a033664455e96cf1b655 100644 |
| --- a/content/browser/system_message_window_win.cc |
| +++ b/content/browser/system_message_window_win.cc |
| @@ -10,11 +10,13 @@ |
| #include "base/logging.h" |
| #include "base/system_monitor/system_monitor.h" |
| +#include "base/win/windows_version.h" |
| #include "base/win/wrapped_window_proc.h" |
| namespace content { |
| namespace { |
| + |
| const wchar_t kWindowClassName[] = L"Chrome_SystemMessageWindow"; |
| // A static map from a device category guid to base::SystemMonitor::DeviceType. |
| @@ -25,6 +27,11 @@ struct { |
| { KSCATEGORY_AUDIO, base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE }, |
| { KSCATEGORY_VIDEO, base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE }, |
| }; |
| + |
| +bool IsCoreAudioSupported() { |
| + return (base::win::GetVersion() >= base::win::VERSION_VISTA); |
| +} |
| + |
| } // namespace |
| // Manages the device notification handles for SystemMessageWindowWin. |
| @@ -46,6 +53,11 @@ class SystemMessageWindowWin::DeviceNotifications { |
| filter.dbcc_size = sizeof(filter); |
| filter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; |
| for (int i = 0; i < arraysize(kDeviceCategoryMap); ++i) { |
| + // From Vista, we use a device listener in AudioDeviceListenerWin. |
| + if (IsCoreAudioSupported() && |
|
DaleCurtis
2012/12/11 19:27:59
This should use Henrik's CoreAudioUtil class.
no longer working on chromium
2012/12/11 20:15:49
I tried include the media/audio/win/core_audio_uti
no longer working on chromium
2012/12/12 10:17:16
including the CoreAudioUtil.h gives me this compil
tommi (sloooow) - chröme
2012/12/12 13:01:09
This doesn't look like related to CoreAudioUtil.h
|
| + KSCATEGORY_AUDIO == kDeviceCategoryMap[i].device_category) |
| + continue; |
| + |
| filter.dbcc_classguid = kDeviceCategoryMap[i].device_category; |
| DCHECK_EQ(notifications_[i], static_cast<HDEVNOTIFY>(NULL)); |
| notifications_[i] = RegisterDeviceNotification( |