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

Side by Side Diff: content/browser/media/audio_stream_monitor.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_
6 #define CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_ 6 #define CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 StreamPollCallbackMap poll_callbacks_; 132 StreamPollCallbackMap poll_callbacks_;
133 133
134 // Records the last time at which sound was audible from any stream. 134 // Records the last time at which sound was audible from any stream.
135 base::TimeTicks last_blurt_time_; 135 base::TimeTicks last_blurt_time_;
136 136
137 // Set to true if the last call to MaybeToggle() determined the indicator 137 // Set to true if the last call to MaybeToggle() determined the indicator
138 // should be turned on. 138 // should be turned on.
139 bool was_recently_audible_; 139 bool was_recently_audible_;
140 140
141 // Calls Poll() at regular intervals while |poll_callbacks_| is non-empty. 141 // Calls Poll() at regular intervals while |poll_callbacks_| is non-empty.
142 base::RepeatingTimer<AudioStreamMonitor> poll_timer_; 142 base::RepeatingTimer poll_timer_;
143 143
144 // Started only when an indicator is toggled on, to turn it off again in the 144 // Started only when an indicator is toggled on, to turn it off again in the
145 // future. 145 // future.
146 base::OneShotTimer<AudioStreamMonitor> off_timer_; 146 base::OneShotTimer off_timer_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(AudioStreamMonitor); 148 DISALLOW_COPY_AND_ASSIGN(AudioStreamMonitor);
149 }; 149 };
150 150
151 } // namespace content 151 } // namespace content
152 152
153 #endif // CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_ 153 #endif // CONTENT_BROWSER_MEDIA_AUDIO_STREAM_MONITOR_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/media/capture/desktop_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698