| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_CHROME_BROWSER_MAIN_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "base/profiler/stack_sampling_profiler.h" |
| 11 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
| 12 #include "chrome/browser/chrome_browser_field_trials.h" | 13 #include "chrome/browser/chrome_browser_field_trials.h" |
| 13 #include "chrome/browser/chrome_process_singleton.h" | 14 #include "chrome/browser/chrome_process_singleton.h" |
| 14 #include "chrome/browser/first_run/first_run.h" | 15 #include "chrome/browser/first_run/first_run.h" |
| 15 #include "chrome/browser/process_singleton.h" | 16 #include "chrome/browser/process_singleton.h" |
| 16 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 17 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 17 #include "content/public/browser/browser_main_parts.h" | 18 #include "content/public/browser/browser_main_parts.h" |
| 18 #include "content/public/common/main_function_params.h" | 19 #include "content/public/common/main_function_params.h" |
| 19 | 20 |
| 20 class BrowserProcessImpl; | 21 class BrowserProcessImpl; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 137 |
| 137 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 138 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 138 // A monitor for attributing power consumption to origins. | 139 // A monitor for attributing power consumption to origins. |
| 139 scoped_ptr<ProcessPowerCollector> process_power_collector_; | 140 scoped_ptr<ProcessPowerCollector> process_power_collector_; |
| 140 #endif | 141 #endif |
| 141 | 142 |
| 142 // Vector of additional ChromeBrowserMainExtraParts. | 143 // Vector of additional ChromeBrowserMainExtraParts. |
| 143 // Parts are deleted in the inverse order they are added. | 144 // Parts are deleted in the inverse order they are added. |
| 144 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 145 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
| 145 | 146 |
| 147 // A profiler that periodically samples stack traces. Used to sample startup |
| 148 // behavior. |
| 149 base::StackSamplingProfiler sampling_profiler_; |
| 150 |
| 146 // Members initialized after / released before main_message_loop_ ------------ | 151 // Members initialized after / released before main_message_loop_ ------------ |
| 147 | 152 |
| 148 scoped_ptr<BrowserProcessImpl> browser_process_; | 153 scoped_ptr<BrowserProcessImpl> browser_process_; |
| 149 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; | 154 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; |
| 150 #if !defined(OS_ANDROID) | 155 #if !defined(OS_ANDROID) |
| 151 // Browser creation happens on the Java side in Android. | 156 // Browser creation happens on the Java side in Android. |
| 152 scoped_ptr<StartupBrowserCreator> browser_creator_; | 157 scoped_ptr<StartupBrowserCreator> browser_creator_; |
| 153 | 158 |
| 154 // Android doesn't support multiple browser processes, so it doesn't implement | 159 // Android doesn't support multiple browser processes, so it doesn't implement |
| 155 // ProcessSingleton. | 160 // ProcessSingleton. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 171 PrefService* local_state_; | 176 PrefService* local_state_; |
| 172 base::FilePath user_data_dir_; | 177 base::FilePath user_data_dir_; |
| 173 | 178 |
| 174 // Members needed across shutdown methods. | 179 // Members needed across shutdown methods. |
| 175 bool restart_last_session_; | 180 bool restart_last_session_; |
| 176 | 181 |
| 177 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 182 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
| 178 }; | 183 }; |
| 179 | 184 |
| 180 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 185 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |