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 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ | 5 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ |
6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ | 6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // initial setup for every process. The embedder has a chance to customize | 25 // initial setup for every process. The embedder has a chance to customize |
26 // startup using the ContentMainDelegate interface. The embedder can also pass | 26 // startup using the ContentMainDelegate interface. The embedder can also pass |
27 // in NULL for |delegate| if they don't want to override default startup. | 27 // in NULL for |delegate| if they don't want to override default startup. |
28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
29 | 29 |
30 // |sandbox_info| should be initialized using InitializeSandboxInfo from | 30 // |sandbox_info| should be initialized using InitializeSandboxInfo from |
31 // content_main_win.h | 31 // content_main_win.h |
32 CONTENT_EXPORT int ContentMain(HINSTANCE instance, | 32 CONTENT_EXPORT int ContentMain(HINSTANCE instance, |
33 sandbox::SandboxInterfaceInfo* sandbox_info, | 33 sandbox::SandboxInterfaceInfo* sandbox_info, |
34 ContentMainDelegate* delegate); | 34 ContentMainDelegate* delegate); |
| 35 #elif defined(OS_ANDROID) |
| 36 // In the Android, the content main starts from ContentMain.java, This function |
| 37 // provides a way to set the |delegate| as ContentMainDelegate for |
| 38 // ContentMainRunner. |
| 39 // This should only be called once before ContentMainRunner actually running. |
| 40 // The ownership of |delegate| is transferred. |
| 41 void SetContentMainDelegate(ContentMainDelegate* delegate); |
35 #else | 42 #else |
36 CONTENT_EXPORT int ContentMain(int argc, | 43 CONTENT_EXPORT int ContentMain(int argc, |
37 const char** argv, | 44 const char** argv, |
38 ContentMainDelegate* delegate); | 45 ContentMainDelegate* delegate); |
39 #endif | 46 #endif // defined(OS_WIN) |
40 | 47 |
41 } // namespace content | 48 } // namespace content |
42 | 49 |
43 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ | 50 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_H_ |
OLD | NEW |