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

Unified Diff: media/audio/win/audio_manager_win.cc

Issue 6602012: Adds method to invoke platform provided audio input UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/win/audio_manager_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_manager_win.cc
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index 0c896d128eefd9c4bb24cb8ee8c79619687936d5..7b3d6fa91a7dbbdf0e142162d5ba23dc6ff395a6 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -11,9 +11,14 @@
#include <setupapi.h>
#include "base/basictypes.h"
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "base/path_service.h"
+#include "base/process_util.h"
#include "base/scoped_ptr.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/win/windows_version.h"
#include "media/audio/fake_audio_input_stream.h"
#include "media/audio/fake_audio_output_stream.h"
#include "media/audio/win/audio_manager_win.h"
@@ -229,6 +234,29 @@ string16 AudioManagerWin::GetAudioInputDeviceModel() {
return string16();
}
+bool AudioManagerWin::CanShowAudioInputSettings() {
+ return true;
+}
+
+void AudioManagerWin::ShowAudioInputSettings() {
+ std::wstring program;
+ std::string argument;
+ if (base::win::GetVersion() <= base::win::VERSION_XP) {
+ program = L"sndvol32.exe";
+ argument = "-R";
+ } else {
+ program = L"control.exe";
+ argument = "mmsys.cpl,,1";
+ }
+
+ FilePath path;
+ PathService::Get(base::DIR_SYSTEM, &path);
+ path = path.Append(program);
+ CommandLine command_line(path);
+ command_line.AppendArg(argument);
+ base::LaunchApp(command_line, false, false, NULL);
+}
+
// static
AudioManager* AudioManager::CreateAudioManager() {
return new AudioManagerWin();
« no previous file with comments | « media/audio/win/audio_manager_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698