content_main_delegate.cc revision 5f1c94371a64b3196d4be9466099bb892df9b88e
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.
4
5#include "content/public/app/content_main_delegate.h"
6
7#include "content/public/browser/content_browser_client.h"
8
9#if !defined(OS_IOS)
10#include "content/public/plugin/content_plugin_client.h"
11#include "content/public/renderer/content_renderer_client.h"
12#include "content/public/utility/content_utility_client.h"
13#endif
14
15namespace content {
16
17bool ContentMainDelegate::BasicStartupComplete(int* exit_code) {
18  return false;
19}
20
21int ContentMainDelegate::RunProcess(
22    const std::string& process_type,
23    const content::MainFunctionParams& main_function_params) {
24  return -1;
25}
26
27#if defined(OS_MACOSX) && !defined(OS_IOS)
28
29bool ContentMainDelegate::ProcessRegistersWithSystemProcess(
30    const std::string& process_type) {
31  return false;
32}
33
34bool ContentMainDelegate::ShouldSendMachPort(const std::string& process_type) {
35  return true;
36}
37
38bool ContentMainDelegate::DelaySandboxInitialization(
39    const std::string& process_type) {
40  return false;
41}
42
43#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_IOS)
44
45void ContentMainDelegate::ZygoteStarting(
46    ScopedVector<ZygoteForkDelegate>* delegates) {
47}
48
49#endif
50
51bool ContentMainDelegate::ShouldEnableTerminationOnHeapCorruption() {
52  return true;
53}
54
55ContentBrowserClient* ContentMainDelegate::CreateContentBrowserClient() {
56#if defined(CHROME_MULTIPLE_DLL_CHILD)
57  return NULL;
58#else
59  return new ContentBrowserClient();
60#endif
61}
62
63ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
64#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
65  return NULL;
66#else
67  return new ContentPluginClient();
68#endif
69}
70
71ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
72#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
73  return NULL;
74#else
75  return new ContentRendererClient();
76#endif
77}
78
79ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
80#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
81  return NULL;
82#else
83  return new ContentUtilityClient();
84#endif
85}
86
87}  // namespace content
88