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

Side by Side Diff: chromeos/audio/audio_devices_pref_handler_stub.cc

Issue 23536034: Set up hdmi output device default volume to 100. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler_stub.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chromeos/audio/audio_devices_pref_handler_stub.h" 5 #include "chromeos/audio/audio_devices_pref_handler_stub.h"
6 6
7 #include "chromeos/audio/audio_device.h" 7 #include "chromeos/audio/audio_device.h"
8 8
9 namespace chromeos { 9 namespace chromeos {
10 10
11 AudioDevicesPrefHandlerStub::AudioDevicesPrefHandlerStub() { 11 AudioDevicesPrefHandlerStub::AudioDevicesPrefHandlerStub() {
12 } 12 }
13 13
14 AudioDevicesPrefHandlerStub::~AudioDevicesPrefHandlerStub() { 14 AudioDevicesPrefHandlerStub::~AudioDevicesPrefHandlerStub() {
15 } 15 }
16 16
17 double AudioDevicesPrefHandlerStub::GetVolumeGainValue( 17 double AudioDevicesPrefHandlerStub::GetOutputVolumeValue(
18 const AudioDevice& device) { 18 const AudioDevice* device) {
19 return audio_device_volume_gain_map_[device.id]; 19 if (!device)
20 return 75.0;
21 return audio_device_volume_gain_map_[device->id];
22 }
23
24 double AudioDevicesPrefHandlerStub::GetInputGainValue(
25 const AudioDevice* device) {
26 if (!device)
27 return 0.0;
28 return audio_device_volume_gain_map_[device->id];
20 } 29 }
21 30
22 void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice& device, 31 void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice& device,
23 double value) { 32 double value) {
24 audio_device_volume_gain_map_[device.id] = value; 33 audio_device_volume_gain_map_[device.id] = value;
25 } 34 }
26 35
27 bool AudioDevicesPrefHandlerStub::GetMuteValue( 36 bool AudioDevicesPrefHandlerStub::GetMuteValue(
28 const AudioDevice& device) { 37 const AudioDevice& device) {
29 return audio_device_mute_map_[device.id]; 38 return audio_device_mute_map_[device.id];
(...skipping 15 matching lines...) Expand all
45 void AudioDevicesPrefHandlerStub::AddAudioPrefObserver( 54 void AudioDevicesPrefHandlerStub::AddAudioPrefObserver(
46 AudioPrefObserver* observer) { 55 AudioPrefObserver* observer) {
47 } 56 }
48 57
49 void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver( 58 void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver(
50 AudioPrefObserver* observer) { 59 AudioPrefObserver* observer) {
51 } 60 }
52 61
53 } // namespace chromeos 62 } // namespace chromeos
54 63
OLDNEW
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler_stub.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698