Chromium Code Reviews| Index: media/audio/win/audio_device_listener_win.h |
| diff --git a/media/audio/win/audio_device_listener_win.h b/media/audio/win/audio_device_listener_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f1b84f1aed77fb4e3b1662e6018d55f6cf1e53d4 |
| --- /dev/null |
| +++ b/media/audio/win/audio_device_listener_win.h |
| @@ -0,0 +1,44 @@ |
| +// 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 MEDIA_AUDIO_WIN_AUDIO_DEVICE_LISTENER_WIN_H_ |
| +#define MEDIA_AUDIO_WIN_AUDIO_DEVICE_LISTENER_WIN_H_ |
| + |
| +#include <MMDeviceAPI.h> |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/win/scoped_comptr.h" |
| +#include "media/audio/audio_manager.h" |
| +#include "media/base/media_export.h" |
| + |
| +using base::win::ScopedComPtr; |
| + |
| +namespace media { |
| + |
| +class MEDIA_EXPORT AudioDeviceListenerWin : public IMMNotificationClient { |
|
henrika (OOO until Aug 14)
2012/10/21 09:00:20
Can you add a TODO on me here so I can refactor so
DaleCurtis
2012/10/23 01:49:42
Done.
|
| + public: |
| + explicit AudioDeviceListenerWin(AudioManager::AudioDeviceListener* listener); |
| + virtual ~AudioDeviceListenerWin(); |
| + |
| + STDMETHOD_(ULONG, AddRef)(); |
|
scherkus (not reviewing)
2012/10/22 23:51:05
emailed chromium-dev about this style
DaleCurtis
2012/10/23 01:49:42
__stdcall seems to be winning. changed.
henrika (OOO until Aug 14)
2012/10/23 07:38:06
Thanks for the effort Andrew.
henrika (OOO until Aug 14)
2012/10/23 08:21:43
But as Tommi states, I am also in favor of keeping
|
| + STDMETHOD_(ULONG, Release)(); |
| + STDMETHOD(QueryInterface)(REFIID iid, void** object); |
| + |
| + STDMETHOD(OnPropertyValueChanged)(LPCWSTR device_id, const PROPERTYKEY key); |
| + STDMETHOD(OnDeviceAdded)(LPCWSTR device_id); |
| + STDMETHOD(OnDeviceRemoved)(LPCWSTR device_id); |
| + STDMETHOD(OnDeviceStateChanged)(LPCWSTR device_id, DWORD new_state); |
| + STDMETHOD(OnDefaultDeviceChanged)(EDataFlow flow, ERole role, |
| + LPCWSTR new_default_device_id); |
| + |
| + private: |
| + AudioManager::AudioDeviceListener* listener_; |
| + ScopedComPtr<IMMDeviceEnumerator> device_enumerator_; |
| + std::string default_device_id_; |
| +}; |
|
scherkus (not reviewing)
2012/10/22 23:51:05
DISALLOW?
DaleCurtis
2012/10/23 01:49:42
Done.
|
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_AUDIO_WIN_AUDIO_DEVICE_LISTENER_WIN_H_ |