| Index: chrome/browser/chromeos/extensions/extension_volume_observer.h
|
| diff --git a/chrome/browser/chromeos/extensions/extension_volume_observer.h b/chrome/browser/chromeos/extensions/extension_volume_observer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..31ddc3af54958b0ac0ba1eac32547936241ff9c9
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/extensions/extension_volume_observer.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_
|
| +#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "chromeos/audio/cras_audio_handler.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +// Dispatches extension events in response to volume events.
|
| +class ExtensionVolumeObserver : public CrasAudioHandler::AudioObserver {
|
| + public:
|
| + // This class registers/unregisters itself as an observer in ctor/dtor.
|
| + ExtensionVolumeObserver();
|
| + ~ExtensionVolumeObserver() override;
|
| +
|
| + // CrasAudioHandler::AudioObserver:
|
| + void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override;
|
| + void OnOutputMuteChanged(bool mute_on, bool system_adjust) override;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ExtensionVolumeObserver);
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_
|
|
|