OLD | NEW |
---|---|
1 // Copyright (c) 2012 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 "content/public/app/content_main.h" | 5 #include "content/public/app/content_main.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "content/public/app/content_main_runner.h" | 8 #include "content/public/app/content_main_runner.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 int ContentMain(HINSTANCE instance, | 13 int ContentMain(HINSTANCE instance, |
14 sandbox::SandboxInterfaceInfo* sandbox_info, | 14 sandbox::SandboxInterfaceInfo* sandbox_info, |
15 ContentMainDelegate* delegate) { | 15 ContentMainDelegate* delegate) { |
16 #else | 16 #else |
17 #if defined(OS_MACOSX) | |
Mark Mentovai
2012/02/28 20:12:40
Refer to my comments in the unexport file for my s
Avi (use Gerrit)
2012/02/29 19:46:50
Done.
| |
18 __attribute__((visibility("default"))) | |
19 #endif // OS_MACOSX | |
17 int ContentMain(int argc, | 20 int ContentMain(int argc, |
18 const char** argv, | 21 const char** argv, |
19 ContentMainDelegate* delegate) { | 22 ContentMainDelegate* delegate) { |
20 #endif // OS_WIN | 23 #endif // OS_WIN |
21 | 24 |
22 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create()); | 25 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create()); |
23 | 26 |
24 int exit_code; | 27 int exit_code; |
25 | 28 |
26 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
27 exit_code = main_runner->Initialize(instance, sandbox_info, delegate); | 30 exit_code = main_runner->Initialize(instance, sandbox_info, delegate); |
28 #else | 31 #else |
29 exit_code = main_runner->Initialize(argc, argv, delegate); | 32 exit_code = main_runner->Initialize(argc, argv, delegate); |
30 #endif // OS_WIN | 33 #endif // OS_WIN |
31 | 34 |
32 if (exit_code >= 0) | 35 if (exit_code >= 0) |
33 return exit_code; | 36 return exit_code; |
34 | 37 |
35 exit_code = main_runner->Run(); | 38 exit_code = main_runner->Run(); |
36 | 39 |
37 main_runner->Shutdown(); | 40 main_runner->Shutdown(); |
38 | 41 |
39 return exit_code; | 42 return exit_code; |
40 } | 43 } |
41 | 44 |
42 } // namespace content | 45 } // namespace content |
OLD | NEW |