Index: extensions/shell/app/shell_main.cc |
diff --git a/extensions/shell/app/shell_main.cc b/extensions/shell/app/shell_main.cc |
index a58ab82d7e17bf4d333920c94977e48bfd937c55..18a6e6342d444a30ffc612371d130f6ca6d1ef7d 100644 |
--- a/extensions/shell/app/shell_main.cc |
+++ b/extensions/shell/app/shell_main.cc |
@@ -10,23 +10,36 @@ |
#include "sandbox/win/src/sandbox_types.h" |
#endif |
-#if defined(OS_WIN) |
-int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { |
-#else |
-int main(int argc, const char** argv) { |
+#if defined(OS_MACOSX) |
+#include "extensions/shell/app/shell_main_mac.h" |
#endif |
+ |
+#if defined(OS_MACOSX) |
+int main(int argc, const char** argv) { |
+ // Do the delegate work in shell_main_mac to avoid having to export the |
+ // delegate types. |
+ return ::ContentMain(argc, argv); |
+} |
+#elif defined(OS_WIN) |
+int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { |
extensions::ShellMainDelegate delegate; |
content::ContentMainParams params(&delegate); |
-#if defined(OS_WIN) |
sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
content::InitializeSandboxInfo(&sandbox_info); |
params.instance = instance; |
params.sandbox_info = &sandbox_info; |
-#else |
+ |
+ return content::ContentMain(params); |
+} |
+#else // non-Mac POSIX |
+int main(int argc, const char** argv) { |
+ extensions::ShellMainDelegate delegate; |
+ content::ContentMainParams params(&delegate); |
+ |
params.argc = argc; |
params.argv = argv; |
-#endif |
return content::ContentMain(params); |
} |
+#endif |