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/macros.h" | 8 #include "base/macros.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" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 StackSamplingConfiguration sampling_profiler_config_; | 158 StackSamplingConfiguration sampling_profiler_config_; |
159 | 159 |
160 // A profiler that periodically samples stack traces. Used to sample startup | 160 // A profiler that periodically samples stack traces. Used to sample startup |
161 // behavior. | 161 // behavior. |
162 base::StackSamplingProfiler sampling_profiler_; | 162 base::StackSamplingProfiler sampling_profiler_; |
163 | 163 |
164 // Members initialized after / released before main_message_loop_ ------------ | 164 // Members initialized after / released before main_message_loop_ ------------ |
165 | 165 |
166 scoped_ptr<BrowserProcessImpl> browser_process_; | 166 scoped_ptr<BrowserProcessImpl> browser_process_; |
167 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; | 167 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; |
168 | 168 #if !defined(OS_ANDROID) |
169 // TODO(bshe): Use !defined(ANDROID_JAVA_UI) once | |
170 // codereview.chromium.org/1459793002 landed. | |
171 #if !defined(OS_ANDROID) || defined(USE_AURA) | |
172 // Browser creation happens on the Java side in Android. | 169 // Browser creation happens on the Java side in Android. |
173 scoped_ptr<StartupBrowserCreator> browser_creator_; | 170 scoped_ptr<StartupBrowserCreator> browser_creator_; |
174 | 171 |
175 // Android doesn't support multiple browser processes, so it doesn't implement | 172 // Android doesn't support multiple browser processes, so it doesn't implement |
176 // ProcessSingleton. | 173 // ProcessSingleton. |
177 scoped_ptr<ChromeProcessSingleton> process_singleton_; | 174 scoped_ptr<ChromeProcessSingleton> process_singleton_; |
178 | 175 |
179 // Android's first run is done in Java instead of native. | 176 // Android's first run is done in Java instead of native. |
180 scoped_ptr<first_run::MasterPrefs> master_prefs_; | 177 scoped_ptr<first_run::MasterPrefs> master_prefs_; |
181 #endif // !defined(OS_ANDROID) || defined(USE_AURA) | 178 #endif |
182 Profile* profile_; | 179 Profile* profile_; |
183 bool run_message_loop_; | 180 bool run_message_loop_; |
184 ProcessSingleton::NotifyResult notify_result_; | 181 ProcessSingleton::NotifyResult notify_result_; |
185 scoped_ptr<ThreeDAPIObserver> three_d_observer_; | 182 scoped_ptr<ThreeDAPIObserver> three_d_observer_; |
186 | 183 |
187 // Initialized in SetupMetricsAndFieldTrials. | 184 // Initialized in SetupMetricsAndFieldTrials. |
188 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; | 185 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; |
189 | 186 |
190 // Members initialized in PreMainMessageLoopRun, needed in | 187 // Members initialized in PreMainMessageLoopRun, needed in |
191 // PreMainMessageLoopRunThreadsCreated. | 188 // PreMainMessageLoopRunThreadsCreated. |
192 PrefService* local_state_; | 189 PrefService* local_state_; |
193 base::FilePath user_data_dir_; | 190 base::FilePath user_data_dir_; |
194 | 191 |
195 // Members needed across shutdown methods. | 192 // Members needed across shutdown methods. |
196 bool restart_last_session_; | 193 bool restart_last_session_; |
197 | 194 |
198 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 195 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
199 }; | 196 }; |
200 | 197 |
201 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 198 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |