Merge pull request #2175 from atom/propagate-app-model-id
Propagate App Model User ID on Windows
This commit is contained in:
commit
0c7c6ddcc9
4 changed files with 34 additions and 0 deletions
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include "atom/common/node_includes.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
@ -87,6 +91,17 @@ 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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue