OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "content/app/content_main.h" | 7 #include "content/public/app/content_main.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #define DLLEXPORT __declspec(dllexport) | 10 #define DLLEXPORT __declspec(dllexport) |
11 | 11 |
12 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. | 12 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. |
13 extern "C" { | 13 extern "C" { |
14 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, | 14 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, |
15 sandbox::SandboxInterfaceInfo* sandbox_info); | 15 sandbox::SandboxInterfaceInfo* sandbox_info); |
16 } | 16 } |
17 #elif defined(OS_POSIX) | 17 #elif defined(OS_POSIX) |
18 extern "C" { | 18 extern "C" { |
19 __attribute__((visibility("default"))) | 19 __attribute__((visibility("default"))) |
20 int ChromeMain(int argc, const char** argv); | 20 int ChromeMain(int argc, const char** argv); |
21 } | 21 } |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
25 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, | 25 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, |
26 sandbox::SandboxInterfaceInfo* sandbox_info) { | 26 sandbox::SandboxInterfaceInfo* sandbox_info) { |
27 ChromeMainDelegate chrome_main_delegate; | 27 ChromeMainDelegate chrome_main_delegate; |
28 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate); | 28 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate); |
29 #elif defined(OS_POSIX) | 29 #elif defined(OS_POSIX) |
30 int ChromeMain(int argc, const char** argv) { | 30 int ChromeMain(int argc, const char** argv) { |
31 ChromeMainDelegate chrome_main_delegate; | 31 ChromeMainDelegate chrome_main_delegate; |
32 return content::ContentMain(argc, argv, &chrome_main_delegate); | 32 return content::ContentMain(argc, argv, &chrome_main_delegate); |
33 #endif | 33 #endif |
34 } | 34 } |
OLD | NEW |