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

Unified Diff: chrome/browser/media/audio_stream_monitor.h

Issue 478543003: Use AudioStreamMonitor to control power save blocking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile. Created 6 years, 4 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/media/audio_stream_monitor.h
diff --git a/chrome/browser/media/audio_stream_monitor.h b/chrome/browser/media/audio_stream_monitor.h
index 3282dbd8ba77edde54c6c35afb17bd4f49e5068e..d8279545a9a45194abe91ac414fba20841d4bfc1 100644
--- a/chrome/browser/media/audio_stream_monitor.h
+++ b/chrome/browser/media/audio_stream_monitor.h
@@ -18,6 +18,10 @@ namespace base {
class TickClock;
}
+namespace content {
+class PowerSaveBlocker;
+}
+
// Repeatedly polls audio streams for their power levels, and "debounces" the
// information into a simple, binary "was recently audible" result for the audio
// indicators in the tab UI. The debouncing logic is to: 1) Turn on immediately
@@ -107,6 +111,9 @@ class AudioStreamMonitor
// future.
base::OneShotTimer<AudioStreamMonitor> off_timer_;
+ // Prevent system sleep when audio is active.
+ scoped_ptr<content::PowerSaveBlocker> blocker_;
+
DISALLOW_COPY_AND_ASSIGN(AudioStreamMonitor);
};
« no previous file with comments | « no previous file | chrome/browser/media/audio_stream_monitor.cc » ('j') | chrome/browser/media/audio_stream_monitor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698