Set the AppUserModelId on the renderer side

This commit is contained in:
Paul Betts 2015-07-09 16:48:02 -07:00
parent 779583adf5
commit 35aaad68d7

View file

@ -27,6 +27,10 @@
#include "atom/common/node_includes.h"
#if defined(OS_WIN)
#include <shlobj.h>
#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();