summaryrefslogtreecommitdiffstats
path: root/content/public/browser/browser_main_parts.h
diff options
context:
space:
mode:
authorstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 21:34:03 +0000
committerstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 21:34:03 +0000
commitc219b794541d520c15eb0579bdc6b55dabe31633 (patch)
tree267d564520407f3fdad15e9b0f3ce5873fe026f9 /content/public/browser/browser_main_parts.h
parentccb65c7419d0d3211148c982b0fc92b2c60eefb8 (diff)
downloadchromium_src-c219b794541d520c15eb0579bdc6b55dabe31633.zip
chromium_src-c219b794541d520c15eb0579bdc6b55dabe31633.tar.gz
chromium_src-c219b794541d520c15eb0579bdc6b55dabe31633.tar.bz2
Revert 110710 - Add ChromeBrowserMainExtraParts for non main parts.
Revert 110741 - Fix ProcessSingletonTest.StartupRaceCondition for win. This was originally submitted as http://codereview.chromium.org/8539038/ which was reverted because of a failing test on win. This reverts the code back to a single instance of BrowserMainParts, with auxillary parts (Gtk, Views, Aura, Touch) implemented from a new base class, ChromeBrowserParts, which has a Chrome specific interface, allowing initialization to be better subdivided. This should fix the notifications auto tests. This CL also addresses the test failure on win (and a test failure on linux_chromeos triggered by the windows fix). BUG=103821 TEST=Make sure all tests and autotests run TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8596015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/browser_main_parts.h')
-rw-r--r--content/public/browser/browser_main_parts.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/content/public/browser/browser_main_parts.h b/content/public/browser/browser_main_parts.h
index 860541c..0bbaa83 100644
--- a/content/public/browser/browser_main_parts.h
+++ b/content/public/browser/browser_main_parts.h
@@ -15,8 +15,9 @@ namespace content {
// Each stage is represented by a single BrowserMainParts method, called from
// the corresponding method in |BrowserMainLoop| (e.g., EarlyInitialization())
// which does the following:
-// - calls a method (e.g., "PreEarlyInitialization()") which implements
-// platform / tookit specific code for that stage.
+// - calls a method (e.g., "PreEarlyInitialization()") for each member of
+// |parts_|. Parts will implement platform or tookit specific code for that
+// stage.
// - calls various methods for things common to all platforms (for that stage).
// - calls a method (e.g., "PostEarlyInitialization()") for platform-specific
// code to be called after the common code.
@@ -48,6 +49,9 @@ namespace content {
// existing chunk which makes it longer than one or two lines, please move
// the code out into a separate method.)
//
+// There can be any number of "Parts". These should be constructed in
+// ContentBrowserClient::CreateBrowserMainParts. Each stage will be called
+// for each part in the order it was added. Destruction is in the inverse order.
class CONTENT_EXPORT BrowserMainParts {
public:
BrowserMainParts() {}
@@ -59,16 +63,17 @@ class CONTENT_EXPORT BrowserMainParts {
virtual void PreMainMessageLoopStart() = 0;
- virtual void PostMainMessageLoopStart() = 0;
-
// Allows an embedder to do any extra toolkit initialization.
virtual void ToolkitInitialized() = 0;
+ virtual void PostMainMessageLoopStart() = 0;
+
virtual void PreMainMessageLoopRun() = 0;
// Returns true if the message loop was run, false otherwise.
- // If this returns false, the default implementation will be run.
// May set |result_code|, which will be returned by |BrowserMain()|.
+ // If no BrowserMainParts implementations return true, the default
+ // implementation will be run.
virtual bool MainMessageLoopRun(int* result_code) = 0;
virtual void PostMainMessageLoopRun() = 0;