From: Paul Betts Date: Thu, 9 Jul 2015 23:48:02 +0000 (-0700) Subject: Set the AppUserModelId on the renderer side X-Git-Tag: v0.30.0~33^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=35aaad68d78b35c0183ff5d4fbdb7cc1b2c6fb75;p=electron.git Set the AppUserModelId on the renderer side --- diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index e2a114af..c0520391 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -27,6 +27,10 @@ #include "atom/common/node_includes.h" +#if defined(OS_WIN) +#include +#endif + namespace atom { namespace { @@ -87,6 +91,15 @@ void AtomRendererClient::WebKitInitialized() { blink::WebCustomElement::addEmbedderCustomElementName("webview"); blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); +#if defined(OS_WIN) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + base::string16 explicit_app_id = command_line->GetSwitchValueNative(switches::kAppUserModelId); + + if (explicit_app_id.length() > 0) { + SetCurrentProcessExplicitAppUserModelID(explicit_app_id.c_str()); + } +#endif + node_bindings_->Initialize(); node_bindings_->PrepareMessageLoop();