OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "media/audio/linux/audio_manager_linux.h" | 5 #include "media/audio/linux/audio_manager_linux.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/nix/xdg_util.h" | 10 #include "base/nix/xdg_util.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 desktop == base::nix::DESKTOP_ENVIRONMENT_KDE3 || | 185 desktop == base::nix::DESKTOP_ENVIRONMENT_KDE3 || |
186 desktop == base::nix::DESKTOP_ENVIRONMENT_KDE4); | 186 desktop == base::nix::DESKTOP_ENVIRONMENT_KDE4); |
187 } | 187 } |
188 | 188 |
189 void AudioManagerLinux::ShowAudioInputSettings() { | 189 void AudioManagerLinux::ShowAudioInputSettings() { |
190 scoped_ptr<base::Environment> env(base::Environment::Create()); | 190 scoped_ptr<base::Environment> env(base::Environment::Create()); |
191 base::nix::DesktopEnvironment desktop = base::nix::GetDesktopEnvironment( | 191 base::nix::DesktopEnvironment desktop = base::nix::GetDesktopEnvironment( |
192 env.get()); | 192 env.get()); |
193 std::string command((desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) ? | 193 std::string command((desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) ? |
194 "gnome-volume-control" : "kmix"); | 194 "gnome-volume-control" : "kmix"); |
195 base::LaunchOptions options; | 195 base::LaunchProcess(CommandLine(FilePath(command)), base::LaunchOptions(), |
196 base::LaunchProcess(CommandLine(FilePath(command)), options); | 196 NULL); |
197 } | 197 } |
198 | 198 |
199 void AudioManagerLinux::GetAudioInputDeviceNames( | 199 void AudioManagerLinux::GetAudioInputDeviceNames( |
200 media::AudioDeviceNames* device_names) { | 200 media::AudioDeviceNames* device_names) { |
201 // TODO(xians): query a full list of valid devices. | 201 // TODO(xians): query a full list of valid devices. |
202 if (HasAudioInputDevices()) { | 202 if (HasAudioInputDevices()) { |
203 // Add the default device to the list. | 203 // Add the default device to the list. |
204 // We use index 0 to make up the unique_id to identify the | 204 // We use index 0 to make up the unique_id to identify the |
205 // default devices. | 205 // default devices. |
206 media::AudioDeviceName name; | 206 media::AudioDeviceName name; |
(...skipping 22 matching lines...) Expand all Loading... |
229 return true; | 229 return true; |
230 } | 230 } |
231 | 231 |
232 return false; | 232 return false; |
233 } | 233 } |
234 | 234 |
235 // static | 235 // static |
236 AudioManager* AudioManager::CreateAudioManager() { | 236 AudioManager* AudioManager::CreateAudioManager() { |
237 return new AudioManagerLinux(); | 237 return new AudioManagerLinux(); |
238 } | 238 } |
OLD | NEW |