media: set the application name for audio streams shown in external apps
authordeepak1556 <hop2deep@gmail.com>
Fri, 7 Oct 2016 10:45:30 +0000 (16:15 +0530)
committerdeepak1556 <hop2deep@gmail.com>
Fri, 7 Oct 2016 10:45:30 +0000 (16:15 +0530)
atom/browser/api/atom_api_app.cc

index c3869c07fea7466a00293becb5b1e67b40a48c97..45857c154e7632878fb951478214a6704382d968 100644 (file)
@@ -37,6 +37,7 @@
 #include "content/public/browser/gpu_data_manager.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/common/content_switches.h"
+#include "media/audio/audio_manager.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "net/ssl/ssl_cert_request_info.h"
@@ -490,6 +491,9 @@ void App::OnWillFinishLaunching() {
 }
 
 void App::OnFinishLaunching(const base::DictionaryValue& launch_info) {
+  // Set the application name for audio streams shown in external
+  // applications. Only affects pulseaudio currently.
+  media::AudioManager::SetGlobalAppName(Browser::Get()->GetName());
   Emit("ready", launch_info);
 }