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 namespace base { |
| 14 class CommandLine; |
| 15 } |
| 16 |
13 // Chrome implementation of ContentMainDelegate. | 17 // Chrome implementation of ContentMainDelegate. |
14 class ChromeMainDelegate : public content::ContentMainDelegate { | 18 class ChromeMainDelegate : public content::ContentMainDelegate { |
15 public: | 19 public: |
16 ChromeMainDelegate(); | 20 ChromeMainDelegate(); |
17 virtual ~ChromeMainDelegate(); | 21 virtual ~ChromeMainDelegate(); |
18 | 22 |
19 protected: | 23 protected: |
20 // content::ContentMainDelegate implementation: | 24 // content::ContentMainDelegate implementation: |
21 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; | 25 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
22 virtual void PreSandboxStartup() OVERRIDE; | 26 virtual void PreSandboxStartup() OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
35 virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE; | 39 virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE; |
36 virtual void ZygoteForked() OVERRIDE; | 40 virtual void ZygoteForked() OVERRIDE; |
37 #endif | 41 #endif |
38 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; | 42 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; |
39 virtual content::ContentPluginClient* CreateContentPluginClient() OVERRIDE; | 43 virtual content::ContentPluginClient* CreateContentPluginClient() OVERRIDE; |
40 virtual content::ContentRendererClient* | 44 virtual content::ContentRendererClient* |
41 CreateContentRendererClient() OVERRIDE; | 45 CreateContentRendererClient() OVERRIDE; |
42 virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; | 46 virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; |
43 | 47 |
44 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
45 void InitMacCrashReporter(const CommandLine& command_line, | 49 void InitMacCrashReporter(const base::CommandLine& command_line, |
46 const std::string& process_type); | 50 const std::string& process_type); |
47 #endif // defined(OS_MACOSX) | 51 #endif // defined(OS_MACOSX) |
48 | 52 |
49 ChromeContentClient chrome_content_client_; | 53 ChromeContentClient chrome_content_client_; |
50 | 54 |
51 // startup_timer_ will hold a reference to stats_counter_timer_. Therefore, | 55 // startup_timer_ will hold a reference to stats_counter_timer_. Therefore, |
52 // the declaration order of these variables matters. Changing this order will | 56 // the declaration order of these variables matters. Changing this order will |
53 // cause startup_timer_ to be freed before stats_counter_timer_, leaving a | 57 // cause startup_timer_ to be freed before stats_counter_timer_, leaving a |
54 // dangling reference. | 58 // dangling reference. |
55 scoped_ptr<base::StatsCounterTimer> stats_counter_timer_; | 59 scoped_ptr<base::StatsCounterTimer> stats_counter_timer_; |
56 scoped_ptr<base::StatsScope<base::StatsCounterTimer> > startup_timer_; | 60 scoped_ptr<base::StatsScope<base::StatsCounterTimer> > startup_timer_; |
57 | 61 |
58 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); | 62 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); |
59 }; | 63 }; |
60 | 64 |
61 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 65 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
OLD | NEW |