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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 8566054: Set up desktop in proper location; fix notification initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | chrome/browser/chrome_browser_parts_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index ab2b807298bf7ffbff46d8103dc8639f3b0c8906..2fd9c4dd4c78a881295aaef2ade897698b76daac 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -200,6 +200,7 @@
#endif
#if defined(USE_AURA)
+#include "chrome/browser/chrome_browser_parts_aura.h"
#include "ui/aura/desktop.h"
#endif
@@ -558,13 +559,6 @@ void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line,
}
}
-#else
-
-void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line,
- Profile* profile) {
- // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below.
-}
-
#endif // defined(OS_CHROMEOS)
#if defined(OS_MACOSX)
@@ -1505,6 +1499,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
SetBrowserX11ErrorHandlers();
#endif
+ // TODO(stevenjb): Move this into a chrome specific stage.
+#if defined(USE_AURA)
+ ChromeBrowserPartsAura::SetupDesktop();
+#elif defined(TOOLKIT_VIEWS)
+ ChromeBrowserPartsViews::SetupDesktop();
+#endif
+
// Profile creation ----------------------------------------------------------
#if defined(OS_CHROMEOS)
@@ -1570,6 +1571,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->browser_policy_connector()->SetUserPolicyTokenService(
profile_->GetTokenService());
}
+
+ // Tests should be able to tune login manager before showing it.
+ // Thus only show login manager in normal (non-testing) mode.
+ if (!parameters().ui_task)
+ OptionallyRunChromeOSLoginManager(parsed_command_line(), profile_);
#endif
#if !defined(OS_MACOSX)
@@ -1852,16 +1858,6 @@ void ChromeBrowserMainParts::StartBrowserOrUITask() {
// Still initializing, so need to allow IO.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- // Set the notification UI manager after any desktop initialization in
- // PreMainMessageLoopRun() is complete, and before starting the browser.
- DesktopNotificationServiceFactory::GetForProfile(profile_)->SetUIManager(
- g_browser_process->notification_ui_manager());
-
- // Tests should be able to tune login manager before showing it.
- // Thus only show login manager in normal (non-testing) mode.
- if (!parameters().ui_task)
- OptionallyRunChromeOSLoginManager(parsed_command_line(), profile_);
-
if (parameters().ui_task) {
// We are in test mode. Run one task and enter the main message loop.
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_parts_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698