Roll src/third_party/WebKit dbf9be3:8d6c3d5 (svn 202308:202312)
[chromium-blink-merge.git] / chrome / app / chrome_main_delegate.h
blob7792f531c4eb07f0c2fa04c269a66a3cdb0f0407
1 // Copyright (c) 2011 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.
5 #ifndef CHROME_APP_CHROME_MAIN_DELEGATE_H_
6 #define CHROME_APP_CHROME_MAIN_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/common/chrome_content_client.h"
10 #include "content/public/app/content_main_delegate.h"
12 template <typename>
13 class ScopedVector;
15 namespace base {
16 class CommandLine;
19 // Chrome implementation of ContentMainDelegate.
20 class ChromeMainDelegate : public content::ContentMainDelegate {
21 public:
22 ChromeMainDelegate();
23 ~ChromeMainDelegate() override;
25 protected:
26 // content::ContentMainDelegate implementation:
27 bool BasicStartupComplete(int* exit_code) override;
28 void PreSandboxStartup() override;
29 void SandboxInitialized(const std::string& process_type) override;
30 int RunProcess(
31 const std::string& process_type,
32 const content::MainFunctionParams& main_function_params) override;
33 void ProcessExiting(const std::string& process_type) override;
34 #if defined(OS_MACOSX)
35 bool ProcessRegistersWithSystemProcess(
36 const std::string& process_type) override;
37 bool ShouldSendMachPort(const std::string& process_type) override;
38 bool DelaySandboxInitialization(const std::string& process_type) override;
39 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
40 void ZygoteStarting(
41 ScopedVector<content::ZygoteForkDelegate>* delegates) override;
42 void ZygoteForked() override;
43 #endif
44 bool ShouldEnableProfilerRecording() override;
46 content::ContentBrowserClient* CreateContentBrowserClient() override;
47 content::ContentPluginClient* CreateContentPluginClient() override;
48 content::ContentRendererClient* CreateContentRendererClient() override;
49 content::ContentUtilityClient* CreateContentUtilityClient() override;
51 #if defined(OS_MACOSX)
52 void InitMacCrashReporter(const base::CommandLine& command_line,
53 const std::string& process_type);
54 #endif // defined(OS_MACOSX)
56 ChromeContentClient chrome_content_client_;
58 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate);
61 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_