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

Unified Diff: ash/common/system/chromeos/audio/tray_audio.h

Issue 2489723005: chromeos: Make system tray audio item observe CrasAudioHandler directly (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « ash/common/system/chromeos/audio/audio_observer.h ('k') | ash/common/system/chromeos/audio/tray_audio.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/audio/tray_audio.h
diff --git a/ash/common/system/chromeos/audio/tray_audio.h b/ash/common/system/chromeos/audio/tray_audio.h
index a468f57262798326fb0582c9b82d3eb7936c0f46..314b360aa854fbe7970cc38b6d358ddab8db807e 100644
--- a/ash/common/system/chromeos/audio/tray_audio.h
+++ b/ash/common/system/chromeos/audio/tray_audio.h
@@ -10,9 +10,9 @@
#include <memory>
#include "ash/ash_export.h"
-#include "ash/common/system/chromeos/audio/audio_observer.h"
#include "ash/common/system/tray/tray_image_item.h"
#include "base/macros.h"
+#include "chromeos/audio/cras_audio_handler.h"
#include "chromeos/dbus/power_manager_client.h"
#include "ui/display/display_observer.h"
@@ -29,13 +29,20 @@ class VolumeView;
// The system tray item for audio input and output.
class ASH_EXPORT TrayAudio : public TrayImageItem,
- public AudioObserver,
+ public chromeos::CrasAudioHandler::AudioObserver,
public display::DisplayObserver,
public chromeos::PowerManagerClient::Observer {
public:
explicit TrayAudio(SystemTray* system_tray);
~TrayAudio() override;
+ // Temporarily shows the pop-up volume slider on all displays. Used by ARC++
+ // when an Android app changes the system volume.
+ static void ShowPopUpVolumeView();
+
+ tray::VolumeView* volume_view_for_testing() { return volume_view_; }
+ bool pop_up_volume_view_for_testing() { return pop_up_volume_view_; }
+
private:
// Overridden from display::DisplayObserver.
void OnDisplayAdded(const display::Display& new_display) override;
@@ -54,8 +61,8 @@ class ASH_EXPORT TrayAudio : public TrayImageItem,
bool ShouldHideArrow() const override;
bool ShouldShowShelf() const override;
- // Overridden from AudioObserver.
- void OnOutputNodeVolumeChanged(uint64_t node_id, double volume) override;
+ // Overridden from CrasAudioHandler::AudioObserver.
+ void OnOutputNodeVolumeChanged(uint64_t node_id, int volume) override;
void OnOutputMuteChanged(bool mute_on, bool system_adjust) override;
void OnAudioNodesChanged() override;
void OnActiveOutputNodeChanged() override;
« no previous file with comments | « ash/common/system/chromeos/audio/audio_observer.h ('k') | ash/common/system/chromeos/audio/tray_audio.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698