content_main_delegate.cc revision b2df76ea8fec9e32f6f3718986dba0d95315b29c
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
45ZygoteForkDelegate* ContentMainDelegate::ZygoteStarting() {
46  return NULL;
47}
48
49#endif
50
51ContentBrowserClient* ContentMainDelegate::CreateContentBrowserClient() {
52  return new ContentBrowserClient();
53}
54
55ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
56#if defined(OS_IOS)
57  return NULL;
58#else
59  return new ContentPluginClient();
60#endif
61}
62
63ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
64  // TODO(scottmg): http://crbug.com/237249 Need split for chrome_child.dll.
65#if defined(OS_IOS) || defined(CHROME_SPLIT_DLL)
66  return NULL;
67#else
68  return new ContentRendererClient();
69#endif
70}
71
72ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
73  // TODO(scottmg): http://crbug.com/237249 Need split for chrome_child.dll.
74#if defined(OS_IOS) || defined(CHROME_SPLIT_DLL)
75  return NULL;
76#else
77  return new ContentUtilityClient();
78#endif
79}
80
81}  // namespace content
82