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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased no-op Created 7 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 | « ash/test/ash_test_helper.cc ('k') | chrome/browser/extensions/test_extension_environment.cc » ('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 a2dfd7a238394c65c568d2a553bdcb81bff45b6e..a614a966969d85ddc19cd40e30d919dfe4ec48a7 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -194,6 +194,10 @@
#include "ui/views/focus/accelerator_handler.h"
#endif
+#if defined(USE_AURA)
+#include "ui/aura/env.h"
+#endif
+
using content::BrowserThread;
namespace {
@@ -1466,6 +1470,12 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
RegisterComponentsForUpdate(parsed_command_line());
+#if defined(USE_AURA)
+ // Env creates the compositor. Aura widgets need the compositor to be created
+ // before they can be initialized by the browser.
+ aura::Env::CreateInstance();
+#endif
+
if (browser_creator_->Start(parsed_command_line(), base::FilePath(),
profile_, last_opened_profiles, &result_code)) {
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/extensions/test_extension_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698