Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: chrome/browser/chrome_browser_main.h

Issue 8302016: Make GTK and Aura parts orthogonal to OS parts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.h
diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h
index 95f2fea609beba0ee0069fbb29108542c978d8ff..817e8dec4cb41ddc73eee96f8559824a7fd219e5 100644
--- a/chrome/browser/chrome_browser_main.h
+++ b/chrome/browser/chrome_browser_main.h
@@ -8,11 +8,12 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/tracked_objects.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/process_singleton.h"
-#include "content/browser/browser_main.h"
+#include "content/public/browser/browser_main_parts.h"
class BrowserProcessImpl;
class FieldTrialSynchronizer;
@@ -22,6 +23,7 @@ class PrefService;
class Profile;
class ShutdownWatcherHelper;
class TranslateManager;
+struct MainFunctionParams;
namespace chrome_browser {
// For use by ShowMissingLocaleMessageBox.
@@ -36,18 +38,30 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
// Constructs metrics service and does related initialization, including
// creation of field trials. Call only after labs have been converted to
// switches.
- MetricsService* SetupMetricsAndFieldTrials(
- const CommandLine& parsed_command_line,
- PrefService* local_state);
+ MetricsService* SetupMetricsAndFieldTrials(PrefService* local_state);
+
+ const MainFunctionParams& parameters() const {
+ return parameters_;
+ }
+ const CommandLine& parsed_command_line() const {
+ return parsed_command_line_;
+ }
protected:
explicit ChromeBrowserMainParts(const MainFunctionParams& parameters);
- virtual void PreMainMessageLoopRun() OVERRIDE;
- int PreMainMessageLoopRunInternal();
- virtual void MainMessageLoopRun() OVERRIDE;
- virtual void PostMainMessageLoopRun() OVERRIDE;
+ // content::BrowserParts overrides
+ virtual void PreEarlyInitialization() OVERRIDE {}
+ virtual void PostEarlyInitialization() OVERRIDE {}
+ virtual void PreMainMessageLoopStart() OVERRIDE {}
virtual void ToolkitInitialized() OVERRIDE;
+ virtual void PostMainMessageLoopStart() OVERRIDE {}
+ virtual void PreMainMessageLoopRun() OVERRIDE;
+ virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
+ virtual void PostMainMessageLoopRun();
+
+ // Displays a warning message that we can't find any locale data files.
+ virtual void ShowMissingLocaleMessageBox() = 0;
private:
// Methods for |EarlyInitialization()| ---------------------------------------
@@ -89,8 +103,16 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
void SetupFieldTrials(bool metrics_recording_enabled,
bool proxy_policy_is_set);
+ // Methods for Main Message Loop -------------------------------------------
+
+ int PreMainMessageLoopRunImpl();
+
// Members initialized on construction ---------------------------------------
+ const MainFunctionParams& parameters_;
+ const CommandLine& parsed_command_line_;
+ int result_code_;
+
// Create ShutdownWatcherHelper object for watching jank during shutdown.
// Please keep |shutdown_watcher| as the first object constructed, and hence
// it is destroyed last.
@@ -138,9 +160,6 @@ void RecordBreakpadStatusUMA(MetricsService* metrics);
// present on the current platform.
void WarnAboutMinimumSystemRequirements();
-// Displays a warning message that we can't find any locale data files.
-void ShowMissingLocaleMessageBox();
-
// Records the time from our process' startup to the present time in
// the UMA histogram |metric_name|.
void RecordBrowserStartupTime();
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698