diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 21:15:46 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 21:15:46 +0000 |
commit | 7b35be2ef7cdf7f52805f70464a269d8ac995385 (patch) | |
tree | 5c41c66579f72c6ec79dd78e3ab2ce1a31f8239f /chrome/browser/chrome_content_browser_client.cc | |
parent | 3727e08519cb1d6329378d94307eec23ae506471 (diff) | |
download | chromium_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 'chrome/browser/chrome_content_browser_client.cc')
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 398958b..d5dd276 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -93,19 +93,15 @@ #endif #if defined(TOOLKIT_USES_GTK) -#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h" +#include "chrome/browser/chrome_browser_parts_gtk.h" #endif #if defined(TOOLKIT_VIEWS) -#include "chrome/browser/chrome_browser_main_extra_parts_views.h" +#include "chrome/browser/chrome_browser_parts_views.h" #endif #if defined(USE_AURA) -#include "chrome/browser/chrome_browser_main_extra_parts_aura.h" -#endif - -#if defined(TOUCH_UI) -#include "chrome/browser/chrome_browser_main_extra_parts_touch.h" +#include "chrome/browser/chrome_browser_parts_aura.h" #endif #if defined(OS_LINUX) || defined(OS_OPENBSD) @@ -113,6 +109,10 @@ #include "chrome/browser/crash_handler_host_linux.h" #endif +#if defined(TOUCH_UI) +#include "chrome/browser/chrome_browser_parts_touch.h" +#endif + #if defined(TOOLKIT_VIEWS) #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" #elif defined(TOOLKIT_USES_GTK) @@ -219,44 +219,43 @@ RenderProcessHostPrivilege GetProcessPrivilege( namespace chrome { -content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts( - const content::MainFunctionParams& parameters) { - ChromeBrowserMainParts* main_parts; +void ChromeContentBrowserClient::CreateBrowserMainParts( + const content::MainFunctionParams& parameters, + std::vector<content::BrowserMainParts*>* parts_list) { // Construct the Main browser parts based on the OS type. #if defined(OS_WIN) - main_parts = new ChromeBrowserMainPartsWin(parameters); + parts_list->push_back(new ChromeBrowserMainPartsWin(parameters)); #elif defined(OS_MACOSX) - main_parts = new ChromeBrowserMainPartsMac(parameters); + parts_list->push_back(new ChromeBrowserMainPartsMac(parameters)); #elif defined(OS_CHROMEOS) - main_parts = new ChromeBrowserMainPartsChromeos(parameters); + parts_list->push_back(new ChromeBrowserMainPartsChromeos(parameters)); #elif defined(OS_LINUX) || defined(OS_OPENBSD) - main_parts = new ChromeBrowserMainPartsLinux(parameters); + parts_list->push_back(new ChromeBrowserMainPartsLinux(parameters)); #elif defined(OS_POSIX) - main_parts = new ChromeBrowserMainPartsPosix(parameters); + parts_list->push_back(new ChromeBrowserMainPartsPosix(parameters)); #else NOTREACHED(); - main_parts = new ChromeBrowserMainParts(parameters); + parts_list->push_back(new ChromeBrowserMainParts(parameters)); #endif // Construct additional browser parts. Stages are called in the order in // which they are added. #if defined(TOOLKIT_USES_GTK) - main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk()); + parts_list->push_back(new ChromeBrowserPartsGtk()); #endif #if defined(TOOLKIT_VIEWS) - main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); + parts_list->push_back(new ChromeBrowserPartsViews()); #endif #if defined(USE_AURA) - main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); + parts_list->push_back(new ChromeBrowserPartsAura()); #endif #if defined(TOUCH_UI) - main_parts->AddParts(new ChromeBrowserMainExtraPartsTouch()); + parts_list->push_back(new ChromeBrowserPartsTouch()); #endif - return main_parts; } RenderWidgetHostView* ChromeContentBrowserClient::CreateViewForWidget( |