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

Side by Side Diff: media/audio/linux/audio_manager_linux.cc

Issue 7351003: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-only Created 9 years, 5 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 | « content/common/sandbox_policy.cc ('k') | media/audio/win/audio_manager_win.cc » ('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) 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
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::LaunchApp(CommandLine(FilePath(command)), false, false, NULL); 195 base::LaunchOptions options;
196 base::LaunchProcess(CommandLine(FilePath(command)), options);
196 } 197 }
197 198
198 void AudioManagerLinux::GetAudioInputDeviceNames( 199 void AudioManagerLinux::GetAudioInputDeviceNames(
199 media::AudioDeviceNames* device_names) { 200 media::AudioDeviceNames* device_names) {
200 // TODO(xians): query a full list of valid devices. 201 // TODO(xians): query a full list of valid devices.
201 if (HasAudioInputDevices()) { 202 if (HasAudioInputDevices()) {
202 // Add the default device to the list. 203 // Add the default device to the list.
203 // 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
204 // default devices. 205 // default devices.
205 media::AudioDeviceName name; 206 media::AudioDeviceName name;
(...skipping 22 matching lines...) Expand all
228 return true; 229 return true;
229 } 230 }
230 231
231 return false; 232 return false;
232 } 233 }
233 234
234 // static 235 // static
235 AudioManager* AudioManager::CreateAudioManager() { 236 AudioManager* AudioManager::CreateAudioManager() {
236 return new AudioManagerLinux(); 237 return new AudioManagerLinux();
237 } 238 }
OLDNEW
« no previous file with comments | « content/common/sandbox_policy.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698