Broke ContentSettingBubbleModelTest.Plugins on Android.
[chromium-blink-merge.git] / content / public / app / content_main.h
blob5016edd56aaa49aeebdeef7482cdc5d7d9c8a53b
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_H_
6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_H_
8 #include "build/build_config.h"
9 #include "content/common/content_export.h"
11 #if defined(OS_WIN)
12 #include <windows.h>
13 #endif
15 namespace sandbox {
16 struct SandboxInterfaceInfo;
19 namespace content {
21 class ContentMainDelegate;
23 // ContentMain should be called from the embedder's main() function to do the
24 // initial setup for every process. The embedder has a chance to customize
25 // startup using the ContentMainDelegate interface. The embedder can also pass
26 // in NULL for |delegate| if they don't want to override default startup.
27 #if defined(OS_WIN)
29 // |sandbox_info| should be initialized using InitializeSandboxInfo from
30 // content_main_win.h
31 CONTENT_EXPORT int ContentMain(HINSTANCE instance,
32 sandbox::SandboxInterfaceInfo* sandbox_info,
33 ContentMainDelegate* delegate);
34 #elif defined(OS_ANDROID)
35 // In the Android, the content main starts from ContentMain.java, This function
36 // provides a way to set the |delegate| as ContentMainDelegate for
37 // ContentMainRunner.
38 // This should only be called once before ContentMainRunner actually running.
39 // The ownership of |delegate| is transferred.
40 CONTENT_EXPORT void SetContentMainDelegate(ContentMainDelegate* delegate);
41 #else
42 CONTENT_EXPORT int ContentMain(int argc,
43 const char** argv,
44 ContentMainDelegate* delegate);
45 #endif // defined(OS_WIN)
47 } // namespace content
49 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_H_