OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
6 #define CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | 6 #define CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "content/app/content_main_delegate.h" | |
12 #include "content/shell/shell_content_client.h" | 11 #include "content/shell/shell_content_client.h" |
| 12 #include "content/public/app/content_main_delegate.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class ShellContentBrowserClient; | 15 class ShellContentBrowserClient; |
16 class ShellContentRendererClient; | 16 class ShellContentRendererClient; |
17 class ShellContentPluginClient; | 17 class ShellContentPluginClient; |
18 class ShellContentUtilityClient; | 18 class ShellContentUtilityClient; |
19 } // namespace content | 19 } // namespace content |
20 | 20 |
21 class ShellMainDelegate : public content::ContentMainDelegate { | 21 class ShellMainDelegate : public content::ContentMainDelegate { |
22 public: | 22 public: |
23 ShellMainDelegate(); | 23 ShellMainDelegate(); |
24 virtual ~ShellMainDelegate(); | 24 virtual ~ShellMainDelegate(); |
25 | 25 |
| 26 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
26 virtual void PreSandboxStartup() OVERRIDE; | 27 virtual void PreSandboxStartup() OVERRIDE; |
27 | 28 virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; |
28 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 29 virtual int RunProcess( |
| 30 const std::string& process_type, |
| 31 const MainFunctionParams& main_function_params) OVERRIDE; |
| 32 virtual void ProcessExiting(const std::string& process_type) OVERRIDE; |
| 33 #if defined(OS_MACOSX) |
| 34 virtual bool ProcessRegistersWithSystemProcess( |
| 35 const std::string& process_type) OVERRIDE; |
| 36 virtual bool ShouldSendMachPort(const std::string& process_type) OVERRIDE; |
| 37 virtual bool DelaySandboxInitialization( |
| 38 const std::string& process_type) OVERRIDE; |
| 39 #elif defined(OS_POSIX) |
| 40 virtual ZygoteForkDelegate* ZygoteStarting() OVERRIDE; |
29 virtual void ZygoteForked() OVERRIDE; | 41 virtual void ZygoteForked() OVERRIDE; |
30 #endif | 42 #endif // OS_MACOSX |
31 | 43 |
32 private: | 44 private: |
33 void InitializeShellContentClient(const std::string& process_type); | 45 void InitializeShellContentClient(const std::string& process_type); |
34 | 46 |
35 scoped_ptr<content::ShellContentBrowserClient> browser_client_; | 47 scoped_ptr<content::ShellContentBrowserClient> browser_client_; |
36 scoped_ptr<content::ShellContentRendererClient> renderer_client_; | 48 scoped_ptr<content::ShellContentRendererClient> renderer_client_; |
37 scoped_ptr<content::ShellContentPluginClient> plugin_client_; | 49 scoped_ptr<content::ShellContentPluginClient> plugin_client_; |
38 scoped_ptr<content::ShellContentUtilityClient> utility_client_; | 50 scoped_ptr<content::ShellContentUtilityClient> utility_client_; |
39 content::ShellContentClient content_client_; | 51 content::ShellContentClient content_client_; |
40 | 52 |
41 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); | 53 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); |
42 }; | 54 }; |
43 | 55 |
44 #endif // CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ | 56 #endif // CONTENT_SHELL_SHELL_MAIN_DELEGATE_H_ |
OLD | NEW |