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

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: minors 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
« no previous file with comments | « extensions/shell/app/paths_mac.mm ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « extensions/shell/app/paths_mac.mm ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698