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 CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 5 #ifndef CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
6 #define CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 6 #define CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/metrics/stats_counters.h" | 9 #include "base/metrics/stats_counters.h" |
10 #include "chrome/common/chrome_content_client.h" | 10 #include "chrome/common/chrome_content_client.h" |
11 #include "content/public/app/content_main_delegate.h" | 11 #include "content/public/app/content_main_delegate.h" |
12 | 12 |
13 // Chrome implementation of ContentMainDelegate. | 13 // Chrome implementation of ContentMainDelegate. |
14 class ChromeMainDelegate : public content::ContentMainDelegate { | 14 class ChromeMainDelegate : public content::ContentMainDelegate { |
15 public: | 15 public: |
16 ChromeMainDelegate(); | 16 ChromeMainDelegate(); |
17 virtual ~ChromeMainDelegate(); | 17 virtual ~ChromeMainDelegate(); |
18 | 18 |
19 private: | |
20 // content::ContentMainDelegate implementation: | 19 // content::ContentMainDelegate implementation: |
20 protected: | |
21 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; | 21 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
22 virtual void PreSandboxStartup() OVERRIDE; | |
23 virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; | 22 virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; |
24 virtual int RunProcess( | 23 virtual int RunProcess( |
25 const std::string& process_type, | 24 const std::string& process_type, |
26 const content::MainFunctionParams& main_function_params) OVERRIDE; | 25 const content::MainFunctionParams& main_function_params) OVERRIDE; |
26 | |
27 private: | |
28 virtual void PreSandboxStartup() OVERRIDE; | |
jam
2012/09/07 22:40:26
splitting up these overridden functions makes read
David Trainor- moved to gerrit
2012/09/10 18:09:13
Done.
| |
29 | |
27 virtual void ProcessExiting(const std::string& process_type) OVERRIDE; | 30 virtual void ProcessExiting(const std::string& process_type) OVERRIDE; |
28 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
29 virtual bool ProcessRegistersWithSystemProcess( | 32 virtual bool ProcessRegistersWithSystemProcess( |
30 const std::string& process_type) OVERRIDE; | 33 const std::string& process_type) OVERRIDE; |
31 virtual bool ShouldSendMachPort(const std::string& process_type) OVERRIDE; | 34 virtual bool ShouldSendMachPort(const std::string& process_type) OVERRIDE; |
32 virtual bool DelaySandboxInitialization( | 35 virtual bool DelaySandboxInitialization( |
33 const std::string& process_type) OVERRIDE; | 36 const std::string& process_type) OVERRIDE; |
34 #elif defined(OS_POSIX) | 37 #elif defined(OS_POSIX) |
35 virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE; | 38 virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE; |
36 virtual void ZygoteForked() OVERRIDE; | 39 virtual void ZygoteForked() OVERRIDE; |
37 #endif | 40 #endif |
38 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; | 41 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; |
39 virtual content::ContentPluginClient* CreateContentPluginClient() OVERRIDE; | 42 virtual content::ContentPluginClient* CreateContentPluginClient() OVERRIDE; |
40 virtual content::ContentRendererClient* | 43 virtual content::ContentRendererClient* |
41 CreateContentRendererClient() OVERRIDE; | 44 CreateContentRendererClient() OVERRIDE; |
42 virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; | 45 virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; |
43 | 46 |
44 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
45 void InitMacCrashReporter(const CommandLine& command_line, | 48 void InitMacCrashReporter(const CommandLine& command_line, |
46 const std::string& process_type); | 49 const std::string& process_type); |
47 #endif // defined(OS_MACOSX) | 50 #endif // defined(OS_MACOSX) |
48 | 51 |
49 chrome::ChromeContentClient chrome_content_client_; | 52 chrome::ChromeContentClient chrome_content_client_; |
50 scoped_ptr<base::StatsScope<base::StatsCounterTimer> > startup_timer_; | 53 scoped_ptr<base::StatsScope<base::StatsCounterTimer> > startup_timer_; |
51 | 54 |
52 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); | 55 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); |
53 }; | 56 }; |
54 | 57 |
55 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 58 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
OLD | NEW |