Index: content/shell/shell_main.cc |
diff --git a/content/shell/shell_main.cc b/content/shell/shell_main.cc |
index 8c4892f8affe0f8785cd55e8f4716a26ce8875a0..7e4eaf7244fefa3bd5cf7ed39921d9f4e5f5e52e 100644 |
--- a/content/shell/shell_main.cc |
+++ b/content/shell/shell_main.cc |
@@ -11,6 +11,10 @@ |
#include "content/public/app/startup_helper_win.h" |
#endif |
+#if defined(OS_MACOSX) |
+#include "content/shell/shell_content_main.h" |
+#endif |
+ |
#if defined(OS_WIN) |
int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { |
@@ -19,19 +23,18 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { |
ShellMainDelegate delegate; |
return content::ContentMain(instance, &sandbox_info, &delegate); |
} |
-#endif |
-#if defined(OS_POSIX) |
+#else |
+int main(int argc, const char** argv) { |
#if defined(OS_MACOSX) |
-__attribute__((visibility("default"))) |
-int main(int argc, const char* argv[]) { |
+ // Do the delegate work in shell_content_main to avoid having to export the |
+ // delegate types. |
+ return ::ContentMain(argc, argv); |
#else |
-int main(int argc, const char** argv) { |
-#endif // OS_MACOSX |
- |
ShellMainDelegate delegate; |
return content::ContentMain(argc, argv, &delegate); |
+#endif // OS_MACOSX |
} |
#endif // OS_POSIX |