| 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/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual void PostMainMessageLoopRun() OVERRIDE; | 74 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 75 virtual void PostDestroyThreads() OVERRIDE; | 75 virtual void PostDestroyThreads() OVERRIDE; |
| 76 | 76 |
| 77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called | 77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called |
| 78 // in order from PreMainMessageLoopRun(). See implementation for details. | 78 // in order from PreMainMessageLoopRun(). See implementation for details. |
| 79 virtual void PreProfileInit(); | 79 virtual void PreProfileInit(); |
| 80 virtual void PostProfileInit(); | 80 virtual void PostProfileInit(); |
| 81 virtual void PreBrowserStart(); | 81 virtual void PreBrowserStart(); |
| 82 virtual void PostBrowserStart(); | 82 virtual void PostBrowserStart(); |
| 83 | 83 |
| 84 #if !defined(OS_ANDROID) |
| 84 // Runs the PageCycler; called if the switch kVisitURLs is present. | 85 // Runs the PageCycler; called if the switch kVisitURLs is present. |
| 85 virtual void RunPageCycler(); | 86 virtual void RunPageCycler(); |
| 87 #endif |
| 86 | 88 |
| 87 // Override this in subclasses to initialize platform specific field trials. | 89 // Override this in subclasses to initialize platform specific field trials. |
| 88 virtual void SetupPlatformFieldTrials(); | 90 virtual void SetupPlatformFieldTrials(); |
| 89 | 91 |
| 90 // Displays a warning message that we can't find any locale data files. | 92 // Displays a warning message that we can't find any locale data files. |
| 91 virtual void ShowMissingLocaleMessageBox() = 0; | 93 virtual void ShowMissingLocaleMessageBox() = 0; |
| 92 | 94 |
| 93 const content::MainFunctionParams& parameters() const { | 95 const content::MainFunctionParams& parameters() const { |
| 94 return parameters_; | 96 return parameters_; |
| 95 } | 97 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 scoped_ptr<base::FieldTrialList> field_trial_list_; | 153 scoped_ptr<base::FieldTrialList> field_trial_list_; |
| 152 | 154 |
| 153 ChromeBrowserFieldTrials browser_field_trials_; | 155 ChromeBrowserFieldTrials browser_field_trials_; |
| 154 | 156 |
| 155 // Vector of additional ChromeBrowserMainExtraParts. | 157 // Vector of additional ChromeBrowserMainExtraParts. |
| 156 // Parts are deleted in the inverse order they are added. | 158 // Parts are deleted in the inverse order they are added. |
| 157 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 159 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
| 158 | 160 |
| 159 // Members initialized after / released before main_message_loop_ ------------ | 161 // Members initialized after / released before main_message_loop_ ------------ |
| 160 | 162 |
| 161 scoped_ptr<StartupBrowserCreator> browser_creator_; | |
| 162 scoped_ptr<BrowserProcessImpl> browser_process_; | 163 scoped_ptr<BrowserProcessImpl> browser_process_; |
| 163 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> | 164 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> |
| 164 tracking_synchronizer_; | 165 tracking_synchronizer_; |
| 166 #if !defined(OS_ANDROID) |
| 167 // Browser creation happens on the Java side in Android. |
| 168 scoped_ptr<StartupBrowserCreator> browser_creator_; |
| 169 |
| 170 // Android doesn't support multiple browser processes, so it doesn't implement |
| 171 // ProcessSingleton. |
| 165 scoped_ptr<ProcessSingleton> process_singleton_; | 172 scoped_ptr<ProcessSingleton> process_singleton_; |
| 173 #endif |
| 166 scoped_ptr<first_run::MasterPrefs> master_prefs_; | 174 scoped_ptr<first_run::MasterPrefs> master_prefs_; |
| 167 bool record_search_engine_; | 175 bool record_search_engine_; |
| 168 TranslateManager* translate_manager_; | 176 TranslateManager* translate_manager_; |
| 169 Profile* profile_; | 177 Profile* profile_; |
| 170 bool run_message_loop_; | 178 bool run_message_loop_; |
| 171 ProcessSingleton::NotifyResult notify_result_; | 179 ProcessSingleton::NotifyResult notify_result_; |
| 172 | 180 |
| 173 // Initialized in SetupMetricsAndFieldTrials. | 181 // Initialized in SetupMetricsAndFieldTrials. |
| 174 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; | 182 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; |
| 175 | 183 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Records the time from our process' startup to the present time in | 216 // Records the time from our process' startup to the present time in |
| 209 // the Startup.BrowserMessageLoopStartTime UMA histogram. | 217 // the Startup.BrowserMessageLoopStartTime UMA histogram. |
| 210 void RecordBrowserStartupTime(); | 218 void RecordBrowserStartupTime(); |
| 211 | 219 |
| 212 // Records a time value to an UMA histogram in the context of the | 220 // Records a time value to an UMA histogram in the context of the |
| 213 // PreReadExperiment field-trial. This also reports to the appropriate | 221 // PreReadExperiment field-trial. This also reports to the appropriate |
| 214 // sub-histogram (_PreRead(Enabled|Disabled)). | 222 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 215 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 223 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 216 | 224 |
| 217 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 225 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |