mirror of
https://github.com/electron/electron.git
synced 2026-01-23 06:18:17 -05:00
Set the AppUserModelId on the renderer side
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user