Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / shell / app / shell_main_delegate.h
blob2d69d08f45b06fe0d7eeb0808bf48ac4c874c8ab
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;
17 #if defined(OS_ANDROID)
18 class BrowserMainRunner;
19 #endif
21 class ShellMainDelegate : public ContentMainDelegate {
22 public:
23 ShellMainDelegate();
24 virtual ~ShellMainDelegate();
26 // ContentMainDelegate implementation:
27 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
28 virtual void PreSandboxStartup() OVERRIDE;
29 virtual int RunProcess(
30 const std::string& process_type,
31 const MainFunctionParams& main_function_params) OVERRIDE;
32 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
33 virtual void ZygoteForked() OVERRIDE;
34 #endif
35 virtual ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
36 virtual ContentRendererClient* CreateContentRendererClient() OVERRIDE;
38 static void InitializeResourceBundle();
40 private:
41 scoped_ptr<ShellContentBrowserClient> browser_client_;
42 scoped_ptr<ShellContentRendererClient> renderer_client_;
43 ShellContentClient content_client_;
45 #if defined(OS_ANDROID)
46 scoped_ptr<BrowserMainRunner> browser_runner_;
47 #endif
49 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
52 } // namespace content
54 #endif // CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_