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

Side by Side Diff: chrome/browser/chromeos/audio_handler.h

Issue 5734002: Continuation of CL 5685007, rename the singleton accessor method in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 11
12 template <typename T> struct DefaultSingletonTraits; 12 template <typename T> struct DefaultSingletonTraits;
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class PulseAudioMixer; 16 class PulseAudioMixer;
17 17
18 class AudioHandler { 18 class AudioHandler {
19 public: 19 public:
20 static AudioHandler* instance(); 20 static AudioHandler* GetInstance();
21 21
22 // Get volume level in our internal 0-100% range, 0 being pure silence. 22 // Get volume level in our internal 0-100% range, 0 being pure silence.
23 // Volume may go above 100% if another process changes PulseAudio's volume. 23 // Volume may go above 100% if another process changes PulseAudio's volume.
24 // Returns default of 0 on error. This function will block until the volume 24 // Returns default of 0 on error. This function will block until the volume
25 // is retrieved or fails. Blocking call. 25 // is retrieved or fails. Blocking call.
26 double GetVolumePercent(); 26 double GetVolumePercent();
27 27
28 // Set volume level from 0-100%. Volumes above 100% are OK and boost volume, 28 // Set volume level from 0-100%. Volumes above 100% are OK and boost volume,
29 // although clipping will occur more at higher volumes. Volume gets quieter 29 // although clipping will occur more at higher volumes. Volume gets quieter
30 // as the percentage gets lower, and then switches to silence at 0%. 30 // as the percentage gets lower, and then switches to silence at 0%.
(...skipping 30 matching lines...) Expand all
61 bool connected_; 61 bool connected_;
62 int reconnect_tries_; 62 int reconnect_tries_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(AudioHandler); 64 DISALLOW_COPY_AND_ASSIGN(AudioHandler);
65 }; 65 };
66 66
67 } // namespace chromeos 67 } // namespace chromeos
68 68
69 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_ 69 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_HANDLER_H_
70 70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698