content_main_delegate.cc revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
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#if defined(OS_IOS)
65  return NULL;
66#else
67  return new ContentRendererClient();
68#endif
69}
70
71ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
72#if defined(OS_IOS)
73  return NULL;
74#else
75  return new ContentUtilityClient();
76#endif
77}
78
79}  // namespace content
80