Chromium Code Reviews| 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/tracked_objects.h" | 11 #include "base/tracked_objects.h" |
| 12 #include "chrome/browser/chrome_browser_field_trials.h" | 12 #include "chrome/browser/chrome_browser_field_trials.h" |
| 13 #include "chrome/browser/chrome_process_singleton.h" | 13 #include "chrome/browser/chrome_process_singleton.h" |
| 14 #include "chrome/browser/first_run/first_run.h" | 14 #include "chrome/browser/first_run/first_run.h" |
| 15 #include "chrome/browser/process_singleton.h" | 15 #include "chrome/browser/process_singleton.h" |
| 16 #include "chrome/browser/task_profiler/auto_tracking.h" | 16 #include "chrome/browser/task_profiler/auto_tracking.h" |
| 17 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 17 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 18 #include "content/public/browser/browser_main_parts.h" | 18 #include "content/public/browser/browser_main_parts.h" |
| 19 #include "content/public/browser/render_view_host.h" | 19 #include "content/public/browser/render_view_host.h" |
| 20 #include "content/public/common/main_function_params.h" | |
| 20 | 21 |
| 21 class ActiveTabTracker; | 22 class ActiveTabTracker; |
| 22 class BrowserProcessImpl; | 23 class BrowserProcessImpl; |
| 23 class ChromeBrowserMainExtraParts; | 24 class ChromeBrowserMainExtraParts; |
| 24 class FieldTrialSynchronizer; | 25 class FieldTrialSynchronizer; |
| 25 class MetricsService; | 26 class MetricsService; |
| 26 class PrefService; | 27 class PrefService; |
| 27 class Profile; | 28 class Profile; |
| 28 class StartupBrowserCreator; | 29 class StartupBrowserCreator; |
| 29 class StartupTimeBomb; | 30 class StartupTimeBomb; |
| 30 class ShutdownWatcherHelper; | 31 class ShutdownWatcherHelper; |
| 31 class ThreeDAPIObserver; | 32 class ThreeDAPIObserver; |
| 32 class TranslateManager; | 33 class TranslateManager; |
| 33 | 34 |
| 34 namespace chrome_browser { | 35 namespace chrome_browser { |
| 35 // For use by ShowMissingLocaleMessageBox. | 36 // For use by ShowMissingLocaleMessageBox. |
| 36 extern const char kMissingLocaleDataTitle[]; | 37 extern const char kMissingLocaleDataTitle[]; |
| 37 extern const char kMissingLocaleDataMessage[]; | 38 extern const char kMissingLocaleDataMessage[]; |
| 38 } | 39 } |
| 39 | 40 |
| 40 namespace chrome_browser_metrics { | 41 namespace chrome_browser_metrics { |
| 41 class TrackingSynchronizer; | 42 class TrackingSynchronizer; |
| 42 } | 43 } |
| 43 | 44 |
| 44 namespace content { | |
| 45 struct MainFunctionParams; | |
| 46 } | |
| 47 | |
| 48 namespace performance_monitor { | 45 namespace performance_monitor { |
| 49 class StartupTimer; | 46 class StartupTimer; |
| 50 } | 47 } |
| 51 | 48 |
| 52 class ChromeBrowserMainParts : public content::BrowserMainParts { | 49 class ChromeBrowserMainParts : public content::BrowserMainParts { |
| 53 public: | 50 public: |
| 54 virtual ~ChromeBrowserMainParts(); | 51 virtual ~ChromeBrowserMainParts(); |
| 55 | 52 |
| 56 // Add additional ChromeBrowserMainExtraParts. | 53 // Add additional ChromeBrowserMainExtraParts. |
| 57 virtual void AddParts(ChromeBrowserMainExtraParts* parts); | 54 virtual void AddParts(ChromeBrowserMainExtraParts* parts); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 // sub-histogram (_PreRead(Enabled|Disabled)). | 126 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 130 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 127 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 131 | 128 |
| 132 // Methods for Main Message Loop ------------------------------------------- | 129 // Methods for Main Message Loop ------------------------------------------- |
| 133 | 130 |
| 134 int PreCreateThreadsImpl(); | 131 int PreCreateThreadsImpl(); |
| 135 int PreMainMessageLoopRunImpl(); | 132 int PreMainMessageLoopRunImpl(); |
| 136 | 133 |
| 137 // Members initialized on construction --------------------------------------- | 134 // Members initialized on construction --------------------------------------- |
| 138 | 135 |
| 139 const content::MainFunctionParams& parameters_; | 136 const content::MainFunctionParams parameters_; |
|
aberent
2013/07/22 15:47:35
This change is needed because the parameters are n
| |
| 140 const CommandLine& parsed_command_line_; | 137 const CommandLine& parsed_command_line_; |
| 141 int result_code_; | 138 int result_code_; |
| 142 | 139 |
| 143 // Create StartupTimeBomb object for watching jank during startup. | 140 // Create StartupTimeBomb object for watching jank during startup. |
| 144 scoped_ptr<StartupTimeBomb> startup_watcher_; | 141 scoped_ptr<StartupTimeBomb> startup_watcher_; |
| 145 | 142 |
| 146 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 143 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
| 147 // Please keep |shutdown_watcher| as the first object constructed, and hence | 144 // Please keep |shutdown_watcher| as the first object constructed, and hence |
| 148 // it is destroyed last. | 145 // it is destroyed last. |
| 149 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 146 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 bool restart_last_session_; | 204 bool restart_last_session_; |
| 208 | 205 |
| 209 // Tests can set this to true to disable restricting cookie access in the | 206 // Tests can set this to true to disable restricting cookie access in the |
| 210 // network stack, as this can only be done once. | 207 // network stack, as this can only be done once. |
| 211 static bool disable_enforcing_cookie_policies_for_tests_; | 208 static bool disable_enforcing_cookie_policies_for_tests_; |
| 212 | 209 |
| 213 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 210 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
| 214 }; | 211 }; |
| 215 | 212 |
| 216 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 213 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |