OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 return ResultCodes::NORMAL_EXIT; | 1374 return ResultCodes::NORMAL_EXIT; |
1375 #endif // defined(OS_WIN) | 1375 #endif // defined(OS_WIN) |
1376 } | 1376 } |
1377 | 1377 |
1378 #if defined(OS_CHROMEOS) | 1378 #if defined(OS_CHROMEOS) |
1379 // This needs to be called after the locale has been set. | 1379 // This needs to be called after the locale has been set. |
1380 RegisterTranslateableItems(); | 1380 RegisterTranslateableItems(); |
1381 #endif | 1381 #endif |
1382 | 1382 |
1383 #if defined(TOOLKIT_VIEWS) | 1383 #if defined(TOOLKIT_VIEWS) |
| 1384 views::Widget::SetPureViews( |
| 1385 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); |
1384 // Launch the views desktop shell window and register it as the default parent | 1386 // Launch the views desktop shell window and register it as the default parent |
1385 // for all unparented views widgets. | 1387 // for all unparented views widgets. |
1386 if (parsed_command_line.HasSwitch(switches::kViewsDesktop)) { | 1388 if (parsed_command_line.HasSwitch(switches::kViewsDesktop)) { |
1387 views::desktop::DesktopWindow::CreateDesktopWindow(); | 1389 views::desktop::DesktopWindow::CreateDesktopWindow(); |
1388 ChromeViewsDelegate* chrome_views_delegate = | 1390 ChromeViewsDelegate* chrome_views_delegate = |
1389 static_cast<ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate); | 1391 static_cast<ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate); |
1390 chrome_views_delegate->default_parent_view = | 1392 chrome_views_delegate->default_parent_view = |
1391 views::desktop::DesktopWindow::desktop_window; | 1393 views::desktop::DesktopWindow::desktop_window; |
1392 } | 1394 } |
1393 #endif | 1395 #endif |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint); | 1788 parsed_command_line.GetSwitchValuePath(switches::kDebugPrint); |
1787 printing::PrintedDocument::set_debug_dump_path(path); | 1789 printing::PrintedDocument::set_debug_dump_path(path); |
1788 } | 1790 } |
1789 #endif | 1791 #endif |
1790 | 1792 |
1791 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2) | 1793 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2) |
1792 views::TouchFactory::GetInstance()->set_keep_mouse_cursor( | 1794 views::TouchFactory::GetInstance()->set_keep_mouse_cursor( |
1793 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepMouseCursor)); | 1795 CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepMouseCursor)); |
1794 #endif | 1796 #endif |
1795 | 1797 |
1796 #if defined(TOOLKIT_VIEWS) | |
1797 views::Widget::SetPureViews( | |
1798 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); | |
1799 #endif | |
1800 | |
1801 HandleTestParameters(parsed_command_line); | 1798 HandleTestParameters(parsed_command_line); |
1802 RecordBreakpadStatusUMA(metrics); | 1799 RecordBreakpadStatusUMA(metrics); |
1803 about_flags::RecordUMAStatistics(local_state); | 1800 about_flags::RecordUMAStatistics(local_state); |
1804 | 1801 |
1805 #if defined(OS_CHROMEOS) | 1802 #if defined(OS_CHROMEOS) |
1806 metrics->StartExternalMetrics(); | 1803 metrics->StartExternalMetrics(); |
1807 | 1804 |
1808 // Initialize the brightness observer so that we'll display an onscreen | 1805 // Initialize the brightness observer so that we'll display an onscreen |
1809 // indication of brightness changes during login. | 1806 // indication of brightness changes during login. |
1810 static chromeos::BrightnessObserver* brightness_observer = | 1807 static chromeos::BrightnessObserver* brightness_observer = |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 #if defined(OS_CHROMEOS) | 1995 #if defined(OS_CHROMEOS) |
1999 // To be precise, logout (browser shutdown) is not yet done, but the | 1996 // To be precise, logout (browser shutdown) is not yet done, but the |
2000 // remaining work is negligible, hence we say LogoutDone here. | 1997 // remaining work is negligible, hence we say LogoutDone here. |
2001 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1998 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
2002 false); | 1999 false); |
2003 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2000 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
2004 #endif | 2001 #endif |
2005 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2002 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
2006 return result_code; | 2003 return result_code; |
2007 } | 2004 } |
OLD | NEW |