diff options
-rw-r--r-- | apps/apps.gypi | 14 | ||||
-rw-r--r-- | apps/shell/app/DEPS | 2 | ||||
-rw-r--r-- | apps/shell/app/shell_main.cc | 18 |
3 files changed, 33 insertions, 1 deletions
diff --git a/apps/apps.gypi b/apps/apps.gypi index 80f2fca..a12a093 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -97,7 +97,7 @@ }, ], # targets 'conditions': [ - ['chromeos==1 or (OS=="linux" and use_aura==1)', { + ['chromeos==1 or (OS=="linux" and use_aura==1) or (OS=="win" and use_aura==1)', { 'targets': [ { 'target_name': 'app_shell', @@ -148,6 +148,18 @@ 'shell/renderer/shell_content_renderer_client.cc', 'shell/renderer/shell_content_renderer_client.h', ], + 'conditions': [ + ['OS=="win"', { + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS + }, + }, + 'dependencies': [ + '../sandbox/sandbox.gyp:sandbox', + ], + }], + ], }, ], # targets }], # chromeos==1 diff --git a/apps/shell/app/DEPS b/apps/shell/app/DEPS index 34169e4..36f09d4 100644 --- a/apps/shell/app/DEPS +++ b/apps/shell/app/DEPS @@ -10,4 +10,6 @@ include_rules = [ "+content/public/app", "+content/public/browser", "+content/public/common", + + "+sandbox", ] diff --git a/apps/shell/app/shell_main.cc b/apps/shell/app/shell_main.cc index c81cfa0..687c61b 100644 --- a/apps/shell/app/shell_main.cc +++ b/apps/shell/app/shell_main.cc @@ -5,7 +5,25 @@ #include "apps/shell/app/shell_main_delegate.h" #include "content/public/app/content_main.h" +#if defined(OS_WIN) +#include "content/public/app/startup_helper_win.h" +#include "sandbox/win/src/sandbox_types.h" +#endif + +#if defined(OS_WIN) + +int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { + sandbox::SandboxInterfaceInfo sandbox_info = {0}; + content::InitializeSandboxInfo(&sandbox_info); + apps::ShellMainDelegate delegate; + return content::ContentMain(instance, &sandbox_info, &delegate); +} + +#else + int main(int argc, const char** argv) { apps::ShellMainDelegate delegate; return content::ContentMain(argc, argv, &delegate); } + +#endif // OS_WIN |