This source file includes following definitions.
- ChromeMain
- ChromeMain
#include "chrome/app/chrome_main_delegate.h"
#include "content/public/app/content_main.h"
#if defined(OS_WIN)
#include "base/win/win_util.h"
#define DLLEXPORT __declspec(dllexport)
extern "C" {
DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info);
}
#elif defined(OS_POSIX)
extern "C" {
__attribute__((visibility("default")))
int ChromeMain(int argc, const char** argv);
}
#endif
#if defined(OS_WIN)
DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info) {
#elif defined(OS_POSIX)
int ChromeMain(int argc, const char** argv) {
#endif
ChromeMainDelegate chrome_main_delegate;
content::ContentMainParams params(&chrome_main_delegate);
#if defined(OS_WIN)
base::win::SetShouldCrashOnProcessDetach(true);
base::win::SetAbortBehaviorForCrashReporting();
params.instance = instance;
params.sandbox_info = sandbox_info;
#else
params.argc = argc;
params.argv = argv;
#endif
int rv = content::ContentMain(params);
#if defined(OS_WIN)
base::win::SetShouldCrashOnProcessDetach(false);
#endif
return rv;
}