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

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

Issue 2190773002: Fix Volume slider is captured in screenshot done in touchview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove OnDidTakeScreenshot; clean code Created 4 years, 5 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: ash/common/system/audio/tray_audio.h
diff --git a/ash/common/system/audio/tray_audio.h b/ash/common/system/audio/tray_audio.h
index 00baf8ccfb94b8ce2a7d072b34d9d3700fa56810..8d568ae38eb2a98aa48e4d6aa945b046ce100550 100644
--- a/ash/common/system/audio/tray_audio.h
+++ b/ash/common/system/audio/tray_audio.h
@@ -11,6 +11,7 @@
#include "ash/common/system/audio/audio_observer.h"
#include "ash/common/system/tray/tray_image_item.h"
+#include "ash/common/wm/maximize_mode/maximize_mode_screenshot_observer.h"
#include "base/macros.h"
#include "ui/display/display_observer.h"
@@ -26,7 +27,8 @@ class VolumeView;
class TrayAudio : public TrayImageItem,
public AudioObserver,
- public display::DisplayObserver {
+ public display::DisplayObserver,
+ public MaximizeModeScreenshotObserver {
public:
TrayAudio(SystemTray* system_tray,
std::unique_ptr<system::TrayAudioDelegate> audio_delegate);
@@ -69,8 +71,15 @@ class TrayAudio : public TrayImageItem,
void OnActiveOutputNodeChanged() override;
void OnActiveInputNodeChanged() override;
+ // Overridden from MaximizeModeScreenshotObserver.
+ void OnWillTakeScreenshotInMaximizeMode() override;
+
void ChangeInternalSpeakerChannelMode();
+ // Indicator if it is doing restoring volume after a maximize mode screenshot.
+ // If true, this volume set should not has popup view.
+ bool hide_popup_;
+
DISALLOW_COPY_AND_ASSIGN(TrayAudio);
};

Powered by Google App Engine
This is Rietveld 408576698