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

Unified Diff: chrome/browser/chromeos/extensions/extension_volume_observer.h

Issue 2427913003: Use mojo volume interfaces for mash and classic ash. (Closed)
Patch Set: Split volume and system events observers; only hook up volume. Created 4 years, 2 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: 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_
« no previous file with comments | « chrome/browser/chromeos/chrome_interface_factory.cc ('k') | chrome/browser/chromeos/extensions/extension_volume_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698