Chromium Code Reviews| 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..4d02f382561fa3646447a468f77abf939aaa17e7 100644 |
| --- a/extensions/shell/app/shell_main.cc |
| +++ b/extensions/shell/app/shell_main.cc |
| @@ -10,11 +10,20 @@ |
| #include "sandbox/win/src/sandbox_types.h" |
| #endif |
| +#if defined(OS_MACOSX) |
| +#include "extensions/shell/app/shell_main_mac.h" |
| +#endif |
| + |
| #if defined(OS_WIN) |
| int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { |
| #else |
| int main(int argc, const char** argv) { |
| #endif |
| +#if defined(OS_MACOSX) |
| + // Do the delegate work in shell_main_mac to avoid having to export the |
| + // delegate types. |
| + return ::ContentMain(argc, argv); |
| +#else |
|
James Cook
2014/12/10 21:05:00
This is turned into ifdef soup. What do you think
Yoyo Zhou
2014/12/11 02:40:49
You're right - this is completely unreadable.
|
| extensions::ShellMainDelegate delegate; |
| content::ContentMainParams params(&delegate); |
| @@ -26,7 +35,8 @@ int main(int argc, const char** argv) { |
| #else |
| params.argc = argc; |
| params.argv = argv; |
| -#endif |
| +#endif // OS_WIN |
| return content::ContentMain(params); |
| +#endif // OS_MACOSX |
| } |