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

Side by Side 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: Fix chrome_frame_net_tests 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 #endif 187 #endif
188 188
189 #if defined(ENABLE_RLZ) 189 #if defined(ENABLE_RLZ)
190 #include "chrome/browser/rlz/rlz.h" 190 #include "chrome/browser/rlz/rlz.h"
191 #endif 191 #endif
192 192
193 #if defined(TOOLKIT_VIEWS) 193 #if defined(TOOLKIT_VIEWS)
194 #include "ui/views/focus/accelerator_handler.h" 194 #include "ui/views/focus/accelerator_handler.h"
195 #endif 195 #endif
196 196
197 #if defined(USE_AURA)
198 #include "ui/aura/env.h"
199 #endif
200
197 using content::BrowserThread; 201 using content::BrowserThread;
198 202
199 namespace { 203 namespace {
200 204
201 // This function provides some ways to test crash and assertion handling 205 // This function provides some ways to test crash and assertion handling
202 // behavior of the program. 206 // behavior of the program.
203 void HandleTestParameters(const CommandLine& command_line) { 207 void HandleTestParameters(const CommandLine& command_line) {
204 // This parameter causes an assertion. 208 // This parameter causes an assertion.
205 if (command_line.HasSwitch(switches::kBrowserAssertTest)) { 209 if (command_line.HasSwitch(switches::kBrowserAssertTest)) {
206 DCHECK(false); 210 DCHECK(false);
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 // only once we log in. 1463 // only once we log in.
1460 std::vector<Profile*> last_opened_profiles; 1464 std::vector<Profile*> last_opened_profiles;
1461 #else 1465 #else
1462 std::vector<Profile*> last_opened_profiles = 1466 std::vector<Profile*> last_opened_profiles =
1463 g_browser_process->profile_manager()->GetLastOpenedProfiles(); 1467 g_browser_process->profile_manager()->GetLastOpenedProfiles();
1464 #endif 1468 #endif
1465 1469
1466 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) 1470 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
1467 RegisterComponentsForUpdate(parsed_command_line()); 1471 RegisterComponentsForUpdate(parsed_command_line());
1468 1472
1473 #if defined(USE_AURA)
1474 aura::Env::CreateInstance();
Ben Goodger (Google) 2013/10/01 23:21:49 If this needs to be in this position you should ad
dnicoara 2013/10/02 18:45:29 Done. Let me know if it needs more detail.
1475 #endif
1476
1469 if (browser_creator_->Start(parsed_command_line(), base::FilePath(), 1477 if (browser_creator_->Start(parsed_command_line(), base::FilePath(),
1470 profile_, last_opened_profiles, &result_code)) { 1478 profile_, last_opened_profiles, &result_code)) {
1471 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 1479 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
1472 // Initialize autoupdate timer. Timer callback costs basically nothing 1480 // Initialize autoupdate timer. Timer callback costs basically nothing
1473 // when browser is not in persistent mode, so it's OK to let it ride on 1481 // when browser is not in persistent mode, so it's OK to let it ride on
1474 // the main thread. This needs to be done here because we don't want 1482 // the main thread. This needs to be done here because we don't want
1475 // to start the timer when Chrome is run inside a test harness. 1483 // to start the timer when Chrome is run inside a test harness.
1476 browser_process_->StartAutoupdateTimer(); 1484 browser_process_->StartAutoupdateTimer();
1477 #endif 1485 #endif
1478 1486
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 chromeos::CrosSettings::Shutdown(); 1656 chromeos::CrosSettings::Shutdown();
1649 #endif 1657 #endif
1650 #endif 1658 #endif
1651 } 1659 }
1652 1660
1653 // Public members: 1661 // Public members:
1654 1662
1655 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1663 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1656 chrome_extra_parts_.push_back(parts); 1664 chrome_extra_parts_.push_back(parts);
1657 } 1665 }
OLDNEW
« 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