OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chromeos/audio/cras_audio_handler.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 // Dispatches extension events in response to volume events. |
| 14 class ExtensionVolumeObserver : public CrasAudioHandler::AudioObserver { |
| 15 public: |
| 16 // This class registers/unregisters itself as an observer in ctor/dtor. |
| 17 ExtensionVolumeObserver(); |
| 18 ~ExtensionVolumeObserver() override; |
| 19 |
| 20 // CrasAudioHandler::AudioObserver: |
| 21 void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override; |
| 22 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override; |
| 23 |
| 24 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(ExtensionVolumeObserver); |
| 26 }; |
| 27 |
| 28 } // namespace chromeos |
| 29 |
| 30 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_VOLUME_OBSERVER_H_ |
OLD | NEW |