Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / shell / app / shell_main_delegate.h
blobf8439bc5f111f8b7a2e7a83a5afc7772b4fac37c
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.
5 #ifndef CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_
6 #define CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/app/content_main_delegate.h"
11 #include "content/shell/common/shell_content_client.h"
13 namespace content {
14 class ShellContentBrowserClient;
15 class ShellContentRendererClient;
16 class ShellContentUtilityClient;
18 #if defined(OS_ANDROID)
19 class BrowserMainRunner;
20 #endif
22 class ShellMainDelegate : public ContentMainDelegate {
23 public:
24 ShellMainDelegate();
25 ~ShellMainDelegate() override;
27 // ContentMainDelegate implementation:
28 bool BasicStartupComplete(int* exit_code) override;
29 void PreSandboxStartup() override;
30 int RunProcess(const std::string& process_type,
31 const MainFunctionParams& main_function_params) override;
32 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
33 void ZygoteForked() override;
34 #endif
35 ContentBrowserClient* CreateContentBrowserClient() override;
36 ContentRendererClient* CreateContentRendererClient() override;
37 ContentUtilityClient* CreateContentUtilityClient() override;
39 static void InitializeResourceBundle();
41 private:
42 scoped_ptr<ShellContentBrowserClient> browser_client_;
43 scoped_ptr<ShellContentRendererClient> renderer_client_;
44 scoped_ptr<ShellContentUtilityClient> utility_client_;
45 ShellContentClient content_client_;
47 #if defined(OS_ANDROID)
48 scoped_ptr<BrowserMainRunner> browser_runner_;
49 #endif
51 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
54 } // namespace content
56 #endif // CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_