Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3653)

Unified Diff: extensions/shell/app/shell_main.cc

Issue 745093002: AppShell support for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698