diff options
author | Hokein.Wu@gmail.com <Hokein.Wu@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 06:14:14 +0000 |
---|---|---|
committer | Hokein.Wu@gmail.com <Hokein.Wu@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 06:14:14 +0000 |
commit | 94b09a7d820ce27ff76f3f4f4eb100bf9a035447 (patch) | |
tree | 973b63d37f88c5ab78b09efa9201d930dd5f53ec | |
parent | d8f7d16ef3379f82b624f8256ab066045bba28d6 (diff) | |
download | chromium_src-94b09a7d820ce27ff76f3f4f4eb100bf9a035447.zip chromium_src-94b09a7d820ce27ff76f3f4f4eb100bf9a035447.tar.gz chromium_src-94b09a7d820ce27ff76f3f4f4eb100bf9a035447.tar.bz2 |
[App Shell] Port app_shell to windows aura.
Allow windows developsers to run app_shell.
BUG=None
TEST=Build app_shell on windows with use_aura=1, it launches normally.
Review URL: https://codereview.chromium.org/136093011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248870 0039d316-1c4b-4281-b951-d872f2087c98
-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 |