content_main_delegate.cc revision ca12bfac764ba476d6cd062bf1dde12cc64c3f40
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#if defined(CHROME_MULTIPLE_DLL_CHILD)
53  return NULL;
54#else
55  return new ContentBrowserClient();
56#endif
57}
58
59ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
60#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
61  return NULL;
62#else
63  return new ContentPluginClient();
64#endif
65}
66
67ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
68#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
69  return NULL;
70#else
71  return new ContentRendererClient();
72#endif
73}
74
75ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
76#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER)
77  return NULL;
78#else
79  return new ContentUtilityClient();
80#endif
81}
82
83}  // namespace content
84