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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 9375017: Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698