summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:15:46 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:15:46 +0000
commit7b35be2ef7cdf7f52805f70464a269d8ac995385 (patch)
tree5c41c66579f72c6ec79dd78e3ab2ce1a31f8239f /content/public
parent3727e08519cb1d6329378d94307eec23ae506471 (diff)
downloadchromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.zip
chromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.tar.gz
chromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.tar.bz2
Revert 110327 - Add ChromeBrowserParts for non main parts.
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. BUG=103821 TEST=Make sure all tests and autotests run Review URL: http://codereview.chromium.org/8539038 TBR=stevenjb@google.com Review URL: http://codereview.chromium.org/8488015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/browser_main_parts.h15
-rw-r--r--content/public/browser/content_browser_client.h5
2 files changed, 13 insertions, 7 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;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 448a973..bc4c32a 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -86,8 +86,9 @@ class ContentBrowserClient {
// Allows the embedder to set any number of custom BrowserMainParts
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
- virtual BrowserMainParts* CreateBrowserMainParts(
- const content::MainFunctionParams& parameters) = 0;
+ virtual void CreateBrowserMainParts(
+ const content::MainFunctionParams& parameters,
+ std::vector<BrowserMainParts*>* parts_list) = 0;
// Platform-specific creator. Use this to construct new RenderWidgetHostViews
// rather than using RenderWidgetHostViewWin & friends.